Author rnk
Recipients giampaolo.rodola, rnk
Date 2009-04-02.20:48:59
SpamBayes Score 1.31323e-05
Marked as misclassified No
Message-id <1238705341.32.0.114796377393.issue5673@psf.upfronthosting.co.za>
In-reply-to
Content
Ugh.  I made the assumption that there must be some natural and easy way
to wait for a child process with a timeout in C, and it turns out it's
actually a hard problem, which is why this isn't already implemented.

So my initial hack for solving this problem in my own project was to run
the subprocess, spawn a thread to wait on it, and then use the thread's
wait method, which does accept a timeout.  On further inspection, it
turns out that Thread.wait() actually uses a busy loop to implement the
timeout, which is what I was trying to avoid.  If it's okay to have a
busy loop there, is it okay to have one in Popen.wait()?  Obviously, you
don't need to busy loop if there is no timeout.
History
Date User Action Args
2009-04-02 20:49:01rnksetrecipients: + rnk, giampaolo.rodola
2009-04-02 20:49:01rnksetmessageid: <1238705341.32.0.114796377393.issue5673@psf.upfronthosting.co.za>
2009-04-02 20:49:00rnklinkissue5673 messages
2009-04-02 20:48:59rnkcreate