NetBSD-Bugs archive

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

Re: bin/47065 (/bin/sh returns success for Bad file descriptor)



Synopsis: /bin/sh returns success for Bad file descriptor

Responsible-Changed-From-To: bin-bug-people->kre
Responsible-Changed-By: kre%NetBSD.org@localhost
Responsible-Changed-When: Fri, 13 May 2016 02:42:03 +0000
Responsible-Changed-Why:
I am (for now) handling this PR


State-Changed-From-To: open->analyzed
State-Changed-By: kre%NetBSD.org@localhost
State-Changed-When: Fri, 13 May 2016 02:42:03 +0000
State-Changed-Why:
This turns out to be mostly a duplicate of PR bin/39466

The problem relates to the way that a vfork'd process reports its status
when it dies because of a shell error (like redirection failure.)

All of "sh -c '(cat <&3)'"  "sh -c '(cat) <&3'" "sh -c 'exec cat <&3'"
worked, because one way or another, they avoided the specific situation
that fails.

I believe I might have a fix (for both this and bin/39466 - the same fix)
but it needs a lot of testing before it gets to see the light of day.

Stay tuned...





Home | Main Index | Thread Index | Old Index