% % This file was automatically produced at Feb 27 2003, 22:51:56 by % c2latex fork-simple.c % \expandafter\ifx\csname indentation\endcsname\relax% \newlength{\indentation}\fi \setlength{\indentation}{0.5em} \begin{flushleft} {\tt \#include} $<${\tt{}stdio.h}$>$\mbox{}\\ {\tt \#include} $<${\tt{}unistd.h}$>$\mbox{}\\ \mbox{}\\ {\bf int} main()\mbox{}\\ \{\mbox{}\\ \hspace*{8\indentation}{\bf int} pid = fork();\mbox{}\\ \hspace*{8\indentation}printf( {\tt"PID is \%d$\backslash$n"}, pid );\mbox{}\\ \hspace*{8\indentation}{\bf if} ( pid == 0 )\mbox{}\\ \hspace*{16\indentation}printf( {\tt"I'm the child$\backslash$n"} );\mbox{}\\ \hspace*{8\indentation}{\bf else}\mbox{}\\ \hspace*{16\indentation}printf( {\tt"I'm the parent$\backslash$n"} );\mbox{}\\ \}\mbox{}\\ \end{flushleft}