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.

Author cmiller
Recipients amaury.forgeotdarc, astrand, cmiller, gregory.p.smith, jnoller, jyasskin, mattjohnston, mpitt, naufraghi, schmir, timjr
Date 2009-08-12.18:31:50
SpamBayes Score 6.9281026e-07
Marked as misclassified No
Message-id <1250101912.82.0.738351256398.issue1068268@psf.upfronthosting.co.za>
In-reply-to
Content
File
"/home/cmiller/work/cabzr/desktopcouch/getport-at-call-time/desktopcouch/start_local_couchdb.py",
line 93, in run_couchdb
    retcode = subprocess.call(local_exec)
  File "/usr/lib/python2.6/subprocess.py", line 444, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.6/subprocess.py", line 1123, in wait
    pid, sts = os.waitpid(self.pid, 0)
exceptions.OSError: [Errno 4] Interrupted system call

Now what?  The process started, but I have no way of knowing when it
finishes or the exit value when it does, because I don't have access to
the Popen object.  Nor can I even kill it and try again, because I can't
get he process id.

try/except in my code can never help.  It must be put in the stdlib.

Or, if this is too egregious, then the docs should scream that
subprocess.call can never safely be used, and users should avoid it.



  File
"/home/cmiller/work/cabzr/desktopcouch/getport-at-call-time/desktopcouch/start_local_couchdb.py",
line 93, in run_couchdb
    retcode = subprocess.call(local_exec)
  File "/usr/lib/python2.6/subprocess.py", line 444, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.6/subprocess.py", line 595, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1084, in _execute_child
    data = os.read(errpipe_read, 1048576) # Exceptions limited to 1 MB
exceptions.OSError: [Errno 4] Interrupted system call


This os.read is a byproduct of something the Popen.__init__
implementation must do, and it is safe for it to continue to get the
information it needs, without the user's knowledge.

The process is started, then this is aborted before the Popen.stdout and
.stderr are set up, leaving the object in a weird state.
History
Date User Action Args
2009-08-12 18:31:53cmillersetrecipients: + cmiller, gregory.p.smith, astrand, amaury.forgeotdarc, mattjohnston, mpitt, timjr, jyasskin, schmir, jnoller, naufraghi
2009-08-12 18:31:52cmillersetmessageid: <1250101912.82.0.738351256398.issue1068268@psf.upfronthosting.co.za>
2009-08-12 18:31:51cmillerlinkissue1068268 messages
2009-08-12 18:31:51cmillercreate