[Python-bugs-list] [ python-Bugs-597795 ] spawn*() doesn't handle errors well
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 03 Sep 2002 12:23:02 -0700
Bugs item #597795, was opened at 2002-08-20 11:36
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=597795&group_id=5470
Category: Python Library
Group: Python 2.2.1
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Jim Hickey (gohickey)
>Assigned to: Guido van Rossum (gvanrossum)
Summary: spawn*() doesn't handle errors well
Initial Comment:
spawn*() routines are supposed to return the child's pid,
but if an error occurs (such as bad parameters, etc.), it
returns 127. This "looks" like a valid pid, so the caller
has no way of knowing if something when wrong.
Throwing an exception would be much more
informational (and python-esque).
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2002-09-03 15:23
Message:
Logged In: YES
user_id=6380
There's nothing that can be done about this. These errors
are detected in the child process; the child process cannot
cause an exception to be raised in the parent. _exit(127) is
what the C library's system() function does in this case.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=597795&group_id=5470