cctools
|
Non Terminal-Stealing popen implementation. More...
Go to the source code of this file.
Functions | |
FILE * | sh_popen (char *command) |
Non Terminal-Stealing popen sh_popen opens a process for execution, providing its output on a stream, just like the standard | |
int | sh_pclose (FILE *file) |
Conclude a sh_popen stream. More... | |
int | sh_system (char *command) |
Non Terminal-Stealing system call sh_system opens a process for execution, and returns the exit status of that call, just like the standard | |
Non Terminal-Stealing popen implementation.
FILE* sh_popen | ( | char * | command | ) |
Non Terminal-Stealing popen
sh_popen opens a process for execution, providing its output on a stream, just like the standard popen
.
However, sh_popen does not steal the terminal control away from the user, making ctrl-c slightly more usuable when signal capturing. This happens by sh_popen forking a child process.
command | The command string to execute. |
int sh_pclose | ( | FILE * | file | ) |
Conclude a sh_popen stream.
file | A file pointer returned from sh_popen. |
int sh_system | ( | char * | command | ) |
Non Terminal-Stealing system call
sh_system opens a process for execution, and returns the exit status of that call, just like the standard system
.
However, sh_system does not steal the terminal control away from the user, making ctrl-c slightly more usuable when signal capturing. This happens by sh_system forking a child process.
command | The command string to execute. |