![]() |
![]()
| ![]() |
![]()
NAMEfilter_create_fd - Create a sub process and return the requested pipes SYNOPSIS#include <util/filter.h> NEOERR *filter_create_fd(const char *cmd, int *fdin, int *fdout, int *fderr, ARGUMENTScmd -> the sub command to execute. Will be executed with
DESCRIPTIONfilter_create_fd and filter_create_fp are what popen been: a mechanism to create sub processes and have pipes to all their input/output. The concept was taken from mutt, though python has something similar with popen3/popen4. You control which pipes the function returns by the fdin/fdout/fderr arguments. A NULL value means "don't create a pipe", a pointer to an int will cause the pipes to be created and the value of the file descriptor stored in the int. You will have to close(2) the file descriptors yourself. RETURN VALUEfdin -> the stdin file descriptor of the sub process
SEE ALSOfilter_wait(3), filter_create_fp(3), filter_create_fd
|