From: arisawa@ar.aichi-u.ac.jp
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: [9fans] exit message
Date: Tue, 22 Aug 2006 23:39:17 +0900 [thread overview]
Message-ID: <34A2CC5A-2123-442A-B794-DA5A14D99A1A@ar.aichi-u.ac.jp> (raw)
In-Reply-To: <a4e6962a0608210843k11736738ib581f7f5208dc567@mail.gmail.com>
Hello,
Do we have any way to find exit message of child process in the
following case?
That is, parent waits child to finish by reading output of child
process.
Biobuf ib;
int fd[2];
pipe(fd);
switch(fork()){
case -1:
return -1;
case 0:
dup(fd[1], 1);
dup(fd[1], 2);
close(fd[1]);
exec(path, argv);
default:
close(fd[1]);
break;
}
Binit(&ib, fd[0], OREAD);
while((p = Brdstr(&ib,'\n',1))){
...
}
/* how to find exit message of child process here? */
Kenji Arisawa
next prev parent reply other threads:[~2006-08-22 14:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-20 17:49 [9fans] grid setup procedure John Floren
2006-08-20 21:08 ` Eric Van Hensbergen
2006-08-21 14:13 ` John Floren
2006-08-21 15:43 ` Eric Van Hensbergen
2006-08-21 16:10 ` David Leimbach
2006-08-22 14:39 ` arisawa [this message]
2006-08-22 14:45 ` [9fans] exit message erik quanstrom
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=34A2CC5A-2123-442A-B794-DA5A14D99A1A@ar.aichi-u.ac.jp \
--to=arisawa@ar.aichi-u.ac.jp \
--cc=9fans@cse.psu.edu \
/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).