Mercurial > hg > toybox
comparison toys/posix/find.c @ 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 | bdd42c1463f8 |
children | 715c765cec61 |
comparison
equal
deleted
inserted
replaced
1471:b748127e092e | 1472:2f9bc9495144 |
---|---|
100 rest = aa->arglen - aa->curly - 1; | 100 rest = aa->arglen - aa->curly - 1; |
101 memcpy(newargs+pos, aa->argstart+aa->curly+1, sizeof(char *)*rest); | 101 memcpy(newargs+pos, aa->argstart+aa->curly+1, sizeof(char *)*rest); |
102 newargs[pos+rest] = 0; | 102 newargs[pos+rest] = 0; |
103 } | 103 } |
104 | 104 |
105 rc = xpclose(xpopen(newargs, 0), 0); | 105 rc = xrun(newargs); |
106 | 106 |
107 llist_traverse(*dl, llist_free_double); | 107 llist_traverse(*dl, llist_free_double); |
108 *dl = 0; | 108 *dl = 0; |
109 aa->namecount = 0; | 109 aa->namecount = 0; |
110 | 110 |