diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-04-01 23:41:28 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-04-01 23:41:28 +0200 |
| commit | ba23d97ef69e9c913775d037b58beb66b5b1384c (patch) | |
| tree | 65680dbbf11c2ab5032a9f81d634e5ee01fd14de /vis.h | |
| parent | e2f4b5bd6e9d8cba940074e9959d6cebf496132a (diff) | |
| download | vis-ba23d97ef69e9c913775d037b58beb66b5b1384c.tar.gz vis-ba23d97ef69e9c913775d037b58beb66b5b1384c.tar.xz | |
vis: cleanup vis_pipe API
Diffstat (limited to 'vis.h')
| -rw-r--r-- | vis.h | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -389,7 +389,16 @@ bool vis_cmd(Vis*, const char *cmd); /* execute any kind (:,?,/) of prompt command */ bool vis_prompt_cmd(Vis*, const char *cmd); -/* pipe a given file range to an external process */ +/* pipe a given file range to an external process + * + * if argv contains only one non-NULL element the command is executed using + * /bin/sh -c (i.e. argument expansion is performed by the shell). In contrast + * if argv contains more than one non-NULL element execvp(argv[0], argv); will + * be used. + * + * if read_std{out,err} are non-NULL they will be called when output from + * the forked process is available. + */ int vis_pipe(Vis *vis, void *context, Filerange *range, const char *argv[], ssize_t (*read_stdout)(void *context, char *data, size_t len), ssize_t (*read_stderr)(void *context, char *data, size_t len)); |
