📄 filter_create_fd.3
字号:
.TH filter_create_fd 3 "12 July 2007" "ClearSilver" "util/filter.h".de Ss.sp.ft CW.nf...de Se.fi.ft P.sp...SH NAMEfilter_create_fd - Create a sub process and return therequested pipes.SH SYNOPSIS.Ss#include <util/filter.h>.Se.SsNEOERR *filter_create_fd(const char *cmd, int *fdin, int *fdout, int *fderr, pid_t *pid);.Se.SH ARGUMENTScmd -> the sub command to execute. Will be executed with.br/bin/sh -c.brfdin -> pointer to return the stdin pipe, or NULL if you don't.brwant the stdin pipe.brfdout -> pointer to return the stdout pipe, or NULL if you don't.brwant the stdout pipe.brfderr -> pointer to return the stderr pipe, or NULL if you don't.brwant the stderr pipe.SH DESCRIPTIONfilter_create_fd and filter_create_fp are what popenbeen: a mechanism to create sub processesand have pipes to all their input/output. The conceptwas taken from mutt, though python has something similarwith popen3/popen4. You control which pipes thefunction returns by the fdin/fdout/fderr arguments. ANULL value means "don't create a pipe", a pointer to anint will cause the pipes to be created and the valueof the file descriptor stored in the int. You will haveto close(2) the file descriptors yourself..SH "RETURN VALUE"fdin -> the stdin file descriptor of the sub process.brfdout -> the stdout file descriptor of the sub process.brfderr -> the stderr file descriptor of the sub process.brpid -> the pid of the sub process.SH "SEE ALSO".BR filter_wait "(3), "filter_create_fp "(3), "filter_create_fd
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -