|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-08f30e8994
|
#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <grass/gis.h>#include <grass/spawn.h>
Go to the source code of this file.
Functions | |
| void | G_popen_clear (struct Popen *state) |
| FILE * | G_popen_write (struct Popen *state, const char *program, const char **args) |
| FILE * | G_popen_read (struct Popen *state, const char *program, const char **args) |
| int | G_popen_close (struct Popen *state) |
| Closes a pipe opened with G_popen_read() or G_popen_write(). | |
Definition at line 56 of file popen.c.
References UntypedStream::fp, NULL, and state.
Referenced by G_open_mail(), G_open_pager(), and G_popen_close().
Closes a pipe opened with G_popen_read() or G_popen_write().
Closes the associated stream, waits for the spawned process to finish, clears the popen state, and returns the process status reported by G_wait(). If the state has no open stream or process, it is cleared and 0 is returned.
| state | Pointer to the popen state to close and reset. |
0 when no process is associated with the state. Definition at line 84 of file popen.c.
References UntypedStream::fp, G_popen_clear(), G_wait(), and state.
Referenced by G_close_mail(), and G_close_pager().