Lines Matching +full:wait +full:- +full:on +full:- +full:write

1 .\" Copyright (C) Caldera International Inc. 2001-2002.  All rights reserved.
32 .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
57 For instance, to time-stamp the output of a program,
66 the in-memory formatting capabilities of
83 Low-Level Process Creation \(em Execl and Execv
92 routine is based on.
115 but this is seldom used except as a place-holder.
201 execl("/bin/sh", "sh", "-c", commandline, NULL);
206 .UL -c
213 Control of Processes \(em Fork and Wait
221 Since these routines simply overlay the new program on the old one,
241 is non-zero; it is the process number of the child.
246 execl("/bin/sh", "sh", "-c", cmd, NULL); /* in child */
261 returns non-zero
267 .UL -1 ).
269 More often, the parent wants to wait for the child to terminate
273 .UL wait :
279 wait(&status);
288 .UL wait
295 funny behavior on the part of the child
307 .UL wait
308 encodes in its low-order eight bits
310 it is 0 for normal termination and non-zero to indicate
378 if (stat == -1)
389 .UL write
395 it will wait until data arrives;
397 is too full, it will wait until the pipe empties somewhat.
398 If the write side of the pipe is closed,
404 let us write a function called
412 read or write that process, according to
417 fout = popen("pr", WRITE);
424 .UL write
438 The child decides whether it is supposed to read or write,
444 These closes are necessary to make end-of-file tests work properly.
446 fails to close the write end of the pipe, it will never
453 #define WRITE 1
466 close(tst(p[WRITE], p[READ]));
468 dup(tst(p[READ], p[WRITE]));
469 close(tst(p[READ], p[WRITE]));
470 execl("/bin/sh", "sh", "-c", cmd, 0);
473 if (popen_pid == -1)
475 close(tst(p[READ], p[WRITE]));
476 return(tst(p[WRITE], p[READ]));
487 closes the write side of the pipe,
492 dup(tst(p[READ], p[WRITE]));
515 when the child process is supposed to write
526 is that it is desirable to wait for the termination of the child process.
531 is that only a bounded number of unwaited-for children
534 .UL wait
551 while ((r = wait(&status)) != popen_pid && r != -1);
552 if (r == -1)
553 status = -1;