Mercurial > hg > toybox
diff toys/other/taskset.c @ 955:144d5ba7d410
Replace users of xexec(toys.optargs) with xexec_optargs(0) to avoid free/reuse bug during argument parsing.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 18 Jul 2013 18:20:03 -0500 |
parents | 7e0cea8fbc3e |
children | cbb1aca81eca |
line wrap: on
line diff
--- a/toys/other/taskset.c Wed Jul 17 17:27:14 2013 -0500 +++ b/toys/other/taskset.c Thu Jul 18 18:20:03 2013 -0500 @@ -90,7 +90,7 @@ if (!(toys.optflags & FLAG_p)) { if (toys.optc < 2) error_exit("Needs 2 args"); do_taskset(getpid(), 1); - xexec(toys.optargs+1); + xexec_optargs(1); } else { char *c; pid_t pid = strtol(toys.optargs[toys.optc-1], &c, 10);