View Full Version : process programming...
kimes
June 22nd, 2005, 01:31 PM
I've just learned about fork ...
Is there any simple project that I can make unlike meaningless 'hello world' printing..?
Thanks in advance
uidzer0org
June 22nd, 2005, 08:55 PM
int main()
{
int return_value;
printf(``Forking process$\backslash$n'');
fork();
printf(``The process id is %d
and return value is %d$\backslash$n",
getpid(), return_value);
execl(``/bin/ls/'',``ls'',``-l'',0);
printf(``This line is not printed$\backslash$n'');
}
modify this for your enjoyment
buffbikedude
June 26th, 2005, 05:57 PM
How about an HTTP server that accepts multiple connections? If the file asked for is executable, you could run the executable as a separate process using CGI.
jerome bettis
June 26th, 2005, 11:20 PM
you could write a simple unix shell like i did here: http://www.ubuntuforums.org/showthread.php?t=43562
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.