|Walk the output of a process|
|Each lines (text) is sent to the oneline functag. It returns the number of line processed, or -1 if some errors.|
|void empty (const char *command)|
|void end ()|
|void fail (const char *command)|
|void init (FILE *fout, bool &end)|
|int oneerr (const char *line, const char *command, FILE *fout)|
|int oneline (const char *line, int noline, FILE *fout)|
|void start (FILE *fout, bool &end)|
Normally walkpopen change to the root directory before executing a command. Further, it cleans up the environment. This is normally used by privileged program to avoid security hole. If you are writting an end user application (no privilege), you may want to set the parameter "user" to true to avoid this directory changing and environment variables filtering.
The command name is just a name. It is looked up in the resource database to locate its path. If the path is already known, an absolute path may be specified instead.
Return the end status of the process.
This is used to send some input to the sub-process so it can start to work
This function must return 0 to continue, -1 to force walkpopen to exit.
Must return -1 if we want the processing to stop.
After sending some information to the sub-process, we close its input. The sub-process receives an end-of-file condition and generally ends its processing.