Re: [PATCH 4/4] [MAIN] Optimize dash -c "command" to avoid a fork

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Herbert Xu wrote:
> On Sun, Apr 10, 2011 at 07:36:49AM +0000, Jonathan Nieder wrote:

>> From: Jilles Tjoelker <jilles@xxxxxxxx>
>> Date: Sat, 13 Jun 2009 16:17:45 -0500
>>
>> This change only affects strings passed to -c, when the -s option is
>> not used.
>>
>> Use the EV_EXIT flag to inform the eval machinery that the string
>> being passed is the entirety of input.  This way, a fork may be
>> omitted in many special cases.
[...]
> OK I will take this patch since its impact is much smaller than
> one that hacks around the input path, and seems to achieve most of
> what you want anyway.

Will that work?  Without the preadateof check, I would worry that
passing EV_EXIT to evalstring would break:

	$ dash -c 'echo one
		echo two'
	one
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux