[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49525] popen2 segfaults if command doesn't ex
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #49525] popen2 segfaults if command doesn't exist |
Date: |
Sat, 17 Dec 2016 20:34:23 -0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 |
Update of bug #49525 (project octave):
Status: None => Patch Submitted
_______________________________________________________
Follow-up Comment #4:
Thanks, marking as working patch submitted.
Returning a failure indicating that the child process couldn't start seems
like it's almost an unsolvable problem to me. Maybe we could open a third pipe
between the parent and the child, set the close-on-exec flag, and use it to
send a failure message back to Octave if exec()ing the child process fails?
Since the user who calls popen2 is expected to communicate with the child and
use waitpid to check status / reap the child anyway, this seems like a
separate feature request, but I think this bug can be closed with the simple
change from exit to _exit (and I chose 127 because that's what bash returns
for command not found).
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49525>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #49525] popen2 segfaults if command doesn't exist,
Mike Miller <=