From: xlp <xlp@emtel.net.co>
To: linux-c-programming@vger.kernel.org
Subject: Daemon fork()ing 4 process
Date: Mon, 15 Jul 2002 19:00:43 -0500 [thread overview]
Message-ID: <20020715184150.A288@nietzsche.metrotel.net.co> (raw)
Hi, I am coding in C a daemon that has to keep 4 process running doing certain operations and when for exmaple, one finish, It fork()s another with other option and so on.
Seudocode:
-Daemon starts,
-It fork()s 4 processess
-It waits for ANY of the procrosses to exit().
-If a process exits, it check the return value, and it fork()s another one with other argument.
C code:
main(){
//fork();, parent dies.
//setsid();
//chdir(workdir);
//umask();
while(1){
// What do you suggest?
}
}
thanks.
next reply other threads:[~2002-07-16 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-16 0:00 xlp [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-07-16 6:59 Daemon fork()ing 4 process Alvarez Alberto-AALVARB1
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020715184150.A288@nietzsche.metrotel.net.co \
--to=xlp@emtel.net.co \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).