From 360d57f843f5435a75270e54583430dcb8f62546 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 14 Sep 2014 12:29:44 -0500 Subject: Split xpopen() into xpopen_both(), xpopen(), and xrun() depending on whether we want to redirect both, one, or neither of stdin/stdout. --- toys/posix/cp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'toys/posix/cp.c') diff --git a/toys/posix/cp.c b/toys/posix/cp.c index d79819b2..d73b7229 100644 --- a/toys/posix/cp.c +++ b/toys/posix/cp.c @@ -341,8 +341,7 @@ static int install_node(struct dirtree *try) // No -r so always one level deep, so destname as set by cp_node() is correct if (toys.optflags & FLAG_s) - if (xpclose(xpopen((char *[]){"strip", "-p", TT.destname, 0}, 0), 0)) - toys.exitval = 1; + if (xrun((char *[]){"strip", "-p", TT.destname, 0})) toys.exitval = 1; return 0; } -- cgit v1.2.3