From: Francesc Oller <francesc@mat.upc.es>
To: linux-kernel@vger.kernel.org
Subject: A fork-like C-wrapper for clone()?
Date: Fri, 06 Apr 2001 12:42:25 +0200 [thread overview]
Message-ID: <3ACD9D91.377B@mat.upc.es> (raw)
Hi all!
is there a fork-like C-wrapper for clone which would let write
something like:
if ((pid=clone(0,SIGCHLD|CLONE_VM))==0) /* child */
{
child_code;
_exit(0);
}
else
{
assert(pid>0); /* mother */
mother_code;
exit(0);
}
I'm not thinking in glibc'__clone or Linus' clone.c example since
they encapsulate the main thread code in a function. (i.e. not
fork-like)
Can somebody point me to some sample code?
I'll thank a CC to my e-mail
cheers
Francesc Oller
reply other threads:[~2001-04-06 11:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3ACD9D91.377B@mat.upc.es \
--to=francesc@mat.upc.es \
--cc=linux-kernel@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