Grant Edwards :
> On 2015-05-31, Marko Rauhamaa wrote:
>> If you don't care to know when child processes exit, you can simply
>> ignore the SIGCHLD signal:
>>
>> import signal
>> signal.signal(signal.SIGCHLD, signal.SIG_IGN)
>>
>> That will prevent zombies from appearing.
>
> Bravo! I've
On 2015-05-31, Marko Rauhamaa wrote:
> Cecil Westerhof :
>
>> At the moment I have the following code:
>> os.chdir(directory)
>> for document in documents:
>> subprocess.Popen(['evince', document])
>>
>> With this I can open several documents at once. But there is no way to
>> know
Op Monday 1 Jun 2015 15:32 CEST schreef Marko Rauhamaa:
> Cecil Westerhof :
>
>> Thread(target = p.wait).start()
>>
>> [...]
>>
>> How about this way of solving it?
>
> It works.
That I knew: I tested it before I posted it. What I mend is this
better, worse, or the same as working with signal. In
Op Monday 1 Jun 2015 14:16 CEST schreef Cecil Westerhof:
> Op Sunday 31 May 2015 23:33 CEST schreef Cecil Westerhof:
>
>> At the moment I have the following code:
>> os.chdir(directory)
>> for document in documents:
>> subprocess.Popen(['evince', document])
>>
>> With this I can open several docum
Cecil Westerhof :
> Thread(target = p.wait).start()
>
> [...]
>
> How about this way of solving it?
It works.
Marko
--
https://mail.python.org/mailman/listinfo/python-list
Op Sunday 31 May 2015 23:33 CEST schreef Cecil Westerhof:
> At the moment I have the following code:
> os.chdir(directory)
> for document in documents:
> subprocess.Popen(['evince', document])
>
> With this I can open several documents at once. But there is no way
> to know when those documents ar
Cecil Westerhof :
> It works. What I find kind of strange because
> https://docs.python.org/2/library/signal.html
You should not rely on Python documentation on Linux system specifics.
The wait(2) manual page states:
POSIX.1-2001 specifies that if the disposition of SIGCHLD is set to
Chris Angelico :
> On Mon, Jun 1, 2015 at 7:20 PM, Cecil Westerhof wrote:
>> But
>> what if I want for certain Popen signals SIG_IGN and others SIG_DFL.
>> How should I do that?
>
> You can't. A signal is a signal; you can't specify default handling
> for some and not others. The only way is to a
On Mon, Jun 1, 2015 at 7:20 PM, Cecil Westerhof wrote:
> But
> what if I want for certain Popen signals SIG_IGN and others SIG_DFL.
> How should I do that?
You can't. A signal is a signal; you can't specify default handling
for some and not others. The only way is to actually handle them, and
the
Op Monday 1 Jun 2015 03:03 CEST schreef Cameron Simpson:
> On 31May2015 23:33, Cecil Westerhof wrote:
>> At the moment I have the following code:
>> os.chdir(directory)
>> for document in documents:
>> subprocess.Popen(['evince', document])
>>
>> With this I can open several documents at once. Bu
Op Monday 1 Jun 2015 00:22 CEST schreef Marko Rauhamaa:
> Cecil Westerhof :
>
>> At the moment I have the following code:
>> os.chdir(directory)
>> for document in documents:
>> subprocess.Popen(['evince', document])
>>
>> With this I can open several documents at once. But there is no way
>> to k
Cameron Simpson writes:
> The standard trick is to make the process a grandchild instead of a
> child. Fork, kick off subprocess, exit (the forked child).
For Cecil Westerhof's benefit: If you haven't seen it, the
‘python-daemon’ library is designed to get this, and other fiddly
aspects of daem
On 31May2015 23:33, Cecil Westerhof wrote:
At the moment I have the following code:
os.chdir(directory)
for document in documents:
subprocess.Popen(['evince', document])
With this I can open several documents at once. But there is no way to
know when those documents are going to be
Cecil Westerhof :
> At the moment I have the following code:
> os.chdir(directory)
> for document in documents:
> subprocess.Popen(['evince', document])
>
> With this I can open several documents at once. But there is no way to
> know when those documents are going to be closed. Th
At the moment I have the following code:
os.chdir(directory)
for document in documents:
subprocess.Popen(['evince', document])
With this I can open several documents at once. But there is no way to
know when those documents are going to be closed. This could/will lead
to zombie pro
15 matches
Mail list logo