From mboxrd@z Thu Jan 1 00:00:00 1970 Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: References: <7d3530220608201049u308d4cd5i975e2542726a2aeb@mail.gmail.com> <7d3530220608210713uf00b0f0udb7326f65f5dc809@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <34A2CC5A-2123-442A-B794-DA5A14D99A1A@ar.aichi-u.ac.jp> Content-Transfer-Encoding: 7bit From: arisawa@ar.aichi-u.ac.jp Date: Tue, 22 Aug 2006 23:39:17 +0900 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: [9fans] exit message Topicbox-Message-UUID: a4f9b98c-ead1-11e9-9d60-3106f5b1d025 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