40 |
int commands_max; /* size of allocated array */ |
int commands_max; /* size of allocated array */ |
41 |
command **commands; |
command **commands; |
42 |
pid_t *pids; |
pid_t *pids; |
43 |
int want_in, want_out; /* if non-zero, create input/output pipes */ |
|
44 |
int infd, outfd; /* created by pipeline_start(), else -1 */ |
/* To be set by the caller. If positive, these contain |
45 |
|
* caller-supplied file descriptors for the input and output of the |
46 |
|
* whole pipeline. If negative, pipeline_start() will create pipes |
47 |
|
* and store the input writing half and the output reading half in |
48 |
|
* infd and outfd as appropriate. If zero, input and output will be |
49 |
|
* left as stdin and stdout. |
50 |
|
*/ |
51 |
|
int want_in, want_out; |
52 |
|
|
53 |
|
/* See above. The caller should consider these read-only. */ |
54 |
|
int infd, outfd; |
55 |
} pipeline; |
} pipeline; |
56 |
|
|
57 |
/* Construct a new command. */ |
/* Construct a new command. */ |