Waiting for processes to finish under Solaris

Juha Autero Juha.Autero at iki.fi
Wed Jul 16 08:36:23 EDT 2003


Behrang Dadsetan <ben at dadsetan.com> writes:


> It is also a very underdocumented feature.. :)) signal.SIG_DFL (0) is
> documented as """SIG_DFL
> This is one of two standard signal handling options; it will simply
> perform the default function for the signal. For example, on most
> systems the default action for SIGQUIT is to dump core and exit, while
> the default action for SIGCLD is to simply ignore it. """
> Hopefully it will NOT SIGQUIT it...

You are reading wrong documentation. signal.SIG_DFL is a constant for
handler parameter of signal.signal. Signal constants are defined
as SIG* without underscore.

Except of course 0, because it is not a signal. From Linux kill(2) man
page:

       int kill(pid_t pid, int sig);
...
       If sig is 0, then no signal is sent, but error checking is
       still performed.

Since os.kill will eventually call kill(2) system call, it works the
same way.

-- 
Juha Autero
http://www.iki.fi/jautero/
Eschew obscurity!






More information about the Python-list mailing list