Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #91647
| From | Marko Rauhamaa <marko@pacujo.net> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Best way to prevent zombie processes |
| Date | 2015-06-01 13:21 +0300 |
| Organization | A noiseless patient Spider |
| Message-ID | <87zj4j91ag.fsf@elektro.pacujo.net> (permalink) |
| References | <87vbf8l9e7.fsf@Equus.decebal.nl> <87vbf88k0n.fsf@elektro.pacujo.net> <87mw0jlr8u.fsf@Equus.decebal.nl> <mailman.277.1433153080.5151.python-list@python.org> |
Chris Angelico <rosuav@gmail.com>: > On Mon, Jun 1, 2015 at 7:20 PM, Cecil Westerhof <Cecil@decebal.nl> 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 > then you can decide what to do on a per-process basis. Signals are a very crude, old-school UNIX system programming concept. One of their worst problems is their global scope. You can't compartmentalize signals through ordinary means of encapsulation (libraries, classes). Linux is addressing this particular issue "as we speak:" This patch series introduces a new clone flag, CLONE_FD, which lets the caller handle child process exit notification via a file descriptor rather than SIGCHLD. <URL: https://lwn.net/Articles/636646/> I guess it will be a while before this facility will be available to Python programmers. For example, signalfd and eventfd were introduced in 2007 and 2010, respectively, but still aren't supported by Python. Marko
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Best way to prevent zombie processes Cecil Westerhof <Cecil@decebal.nl> - 2015-05-31 23:33 +0200
Re: Best way to prevent zombie processes Marko Rauhamaa <marko@pacujo.net> - 2015-06-01 01:22 +0300
Re: Best way to prevent zombie processes Cecil Westerhof <Cecil@decebal.nl> - 2015-06-01 11:20 +0200
Re: Best way to prevent zombie processes Chris Angelico <rosuav@gmail.com> - 2015-06-01 20:04 +1000
Re: Best way to prevent zombie processes Marko Rauhamaa <marko@pacujo.net> - 2015-06-01 13:21 +0300
Re: Best way to prevent zombie processes Marko Rauhamaa <marko@pacujo.net> - 2015-06-01 13:25 +0300
Re: Best way to prevent zombie processes Grant Edwards <invalid@invalid.invalid> - 2015-06-01 14:59 +0000
Re: Best way to prevent zombie processes Marko Rauhamaa <marko@pacujo.net> - 2015-06-01 18:39 +0300
Re: Best way to prevent zombie processes Cameron Simpson <cs@zip.com.au> - 2015-06-01 11:03 +1000
Re: Best way to prevent zombie processes Cecil Westerhof <Cecil@decebal.nl> - 2015-06-01 11:23 +0200
Re: Best way to prevent zombie processes Ben Finney <ben+python@benfinney.id.au> - 2015-06-01 13:37 +1000
Re: Best way to prevent zombie processes Cecil Westerhof <Cecil@decebal.nl> - 2015-06-01 14:16 +0200
Re: Best way to prevent zombie processes Marko Rauhamaa <marko@pacujo.net> - 2015-06-01 16:32 +0300
Re: Best way to prevent zombie processes Cecil Westerhof <Cecil@decebal.nl> - 2015-06-01 16:37 +0200
Re: Best way to prevent zombie processes Cecil Westerhof <Cecil@decebal.nl> - 2015-06-01 15:03 +0200
csiph-web