diff lib/lib.h @ 1472:2f9bc9495144 draft

Split xpopen() into xpopen_both(), xpopen(), and xrun() depending on whether we want to redirect both, one, or neither of stdin/stdout.
author Rob Landley <rob@landley.net>
date Sun, 14 Sep 2014 12:29:44 -0500
parents 487716951287
children 95cb37adb024
line wrap: on
line diff
--- a/lib/lib.h	Sat Sep 13 14:48:37 2014 -0500
+++ b/lib/lib.h	Sun Sep 14 12:29:44 2014 -0500
@@ -95,8 +95,12 @@
 pid_t xfork(void);
 void xexec_optargs(int skip);
 void xexec(char **argv);
-pid_t xpopen(char **argv, int *pipes);
-int xpclose(pid_t pid, int *pipes);
+pid_t xpopen_both(char **argv, int *pipes);
+int xpclose_both(pid_t pid, int *pipes);
+pid_t xpopen(char **argv, int *pipe, int stdout);
+pid_t xpclose(pid_t pid, int pipe);
+int xrun(char **argv);
+int xpspawn(char **argv, int*pipes);
 void xaccess(char *path, int flags);
 void xunlink(char *path);
 int xcreate(char *path, int flags, int mode);