This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: spawn*() doesn't handle errors well
Type: Stage:
Components: Library (Lib) Versions: Python 2.2
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: gohickey, gvanrossum
Priority: normal Keywords:

Created on 2002-08-20 15:36 by gohickey, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (2)
msg12060 - (view) Author: Jim Hickey (gohickey) Date: 2002-08-20 15:36
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).
msg12061 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-09-03 19:23
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.
History
Date User Action Args
2022-04-10 16:05:36adminsetgithub: 37061
2002-08-20 15:36:12gohickeycreate