[PATCH] tar --to-command

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Fri Jun 25 08:36:53 UTC 2010


On Thu, Jun 24, 2010 at 04:51:49AM +0200, Denys Vlasenko wrote:
>On Monday 21 June 2010 19:41, Ladislav Michl wrote:

>> +		static const char *sh = "/bin/sh";
>
>static const char sh[] = "/bin/sh",
>but better just use literal "/bin/sh" where you need the string.

and the best thing would be to use DEFAULT_SHELL (see include/libbb.h)
Other occurances of literal "/bin/sh" that crept in lately should be
fixed, too.
>
>> +		xpipe(p);
>> +		sig_pipe = signal(SIGPIPE, SIG_IGN);
>> +		pid = BB_MMU ? fork() : vfork();

Didn't look at the full patch, but this hunk may sound like a candidate
for spawn_and_wait(), perhaps?


More information about the busybox mailing list