FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 10-06-2011, 02:35 PM
Stéphane Glondu
 
Default regression: "sh -c" change causes FTBFS

[CC-ing debian-devel to get more opinions]

On 10/06/2011 04:07 PM, Jonathan Nieder wrote:
>> ocamlbuild's logic is definitively incorrect, but I'm not sure if dash's
>> new behaviour is correct. "bash -c" doesn't skip fork() when a
>> redirection is set up, I guess for a reason. "dash -c" should probably
>> do the same for the same reason.
>
> Hold on a second. Dash is not supposed to be a bash emulator.
>
> ksh93 -c "/bin/sleep 100 >dev/null" does skip a fork(). I suspect
> bash does not skip a fork in this case for the same reason that
>
> bash -c 'echo hi; /bin/sleep 100'
>
> does not skip a fork.

POSIX's Shell and Utilities (XCU) 2.12 [1] does say that "[the]
environment of the shell process shall not be changed by the utility",
and that environment includes open files. My understanding is that
dash's new behaviour (and incidentally, ksh93's one) is incorrect.

[1]
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_12


Cheers,

--
Stéphane


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4E8DBCC1.3050900@debian.org">http://lists.debian.org/4E8DBCC1.3050900@debian.org
 
Old 10-06-2011, 02:40 PM
Jonathan Nieder
 
Default regression: "sh -c" change causes FTBFS

Stéphane Glondu wrote:
> On 10/06/2011 04:07 PM, Jonathan Nieder wrote:

>> ksh93 -c "/bin/sleep 100 >dev/null" does skip a fork(). I suspect
>> bash does not skip a fork in this case for the same reason that
>>
>> bash -c 'echo hi; /bin/sleep 100'
>>
>> does not skip a fork.
>
> POSIX's Shell and Utilities (XCU) 2.12 [1] does say that "[the]
> environment of the shell process shall not be changed by the utility",
> and that environment includes open files. My understanding is that
> dash's new behaviour (and incidentally, ksh93's one) is incorrect.

Is your question about POSIX or about correct behavior in Debian? If
POSIX, the list to contact is austin-group-l@opengroup.org. If
Debian, please feel free to brainstorm at debian-devel@, to provide
supporting information to dash@packages.debian.org (or any dash bug
report), to clarify policy using the debian-policy@ list, or to
consult debian-ctte@ if you do not trust Gerrit's judgement.

Hope that helps,
Jonathan


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111006144058.GA5415@elie">http://lists.debian.org/20111006144058.GA5415@elie
 

Thread Tools




All times are GMT. The time now is 07:28 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org