[f21/master 1/2] Wrap interruptible system calls in a loop (#1160041)
Vratislav Podzimek
vpodzime at redhat.com
Thu Nov 6 06:30:35 UTC 2014
On Wed, 2014-11-05 at 17:07 -0800, Brian C. Lane wrote:
> On Tue, Nov 04, 2014 at 11:03:49AM -0500, David Shea wrote:
> > Some system calls are interrupted by the receipt of a signal, for us
> > most commonly a SIGCHLD caused by a process run from a different thread,
> > which causes the call to return -1 and set errno to EINTR, which python
> > converts into an OSError. Handle this by retrying the call.
>
> What the heck? So basically system calls aren't thread-safe when using
> subprocess in another thread? Seems like something that ought to be
> fixed upstream.
subprocess is not thread-safe. Although some say it is I remember weird
things happened when I tried to use subprocess for spawning many
processes from many threads to check NTP server availability.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list