feat(process): fork/exec/id/session + system/popen
This commit is contained in:
@@ -261,6 +261,21 @@ tmpfile(void);
|
||||
__attribute__((pure)) int
|
||||
fileno(FILE *stream);
|
||||
|
||||
/*
|
||||
* Run command in a subshell ("sh -c command") with a pipe attached to
|
||||
* its standard output (mode "r") or standard input (mode "w"). Only the
|
||||
* two POSIX modes are accepted (the glibc "re"/"we" close-on-exec
|
||||
* extension is not). Returns the stream, or NULL with errno set.
|
||||
* pclose closes the stream, waits for the shell, and returns its
|
||||
* termination status (the raw wait status, e.g. 0 for "exit 0"), or -1
|
||||
* when the stream was not opened by popen or the wait failed.
|
||||
*/
|
||||
FILE *
|
||||
popen(const char *command, const char *mode);
|
||||
|
||||
int
|
||||
pclose(FILE *stream);
|
||||
|
||||
/* getc/putc/getchar/putchar as macros over fgetc/fputc (see above). */
|
||||
#define getc(stream) fgetc(stream)
|
||||
#define putc(c, stream) fputc((c), (stream))
|
||||
|
||||
Reference in New Issue
Block a user