we use os.system() to call pdftk. This program uses
SIGPWR to communicate with its child process.
Somehow the signal mask ignores this signal.
Setting WSGIRestrictSignal to off does not help.
Any hints?
Can you explain what the code does a bit better.
Is the WSGI application sending SIGPWR to the process created by
os.system(), or the process invoked by os.system() is trying to send
SIGPWR back to the WSGI application process. Or the process created by
os.system() is trying to use SIGPWR to communicate with other
processes it creates.
Also explain why it uses the signal in the first place. It seems to be
a very odd signal number to be using for PDF generation toolkit.
Graham
Hi,
pdftk sends and receives SIGPWR. It is written in Java, and
according to [1] the signal is used for garbage collection. I
just discovered during debugging the problem with strace.
My code does not catch or send this signal.
Unfortunatly there is no method in the standard library of
python to modify the signal mask. Maybe it could be done
with ctypes.
Any hints?
[1] http://gcc.gnu.org/java/gdb.html
Thomas
Still doesn't make much sense. When you use os.system() it shouldn't
be inheriting anything about signals or signal masks from mod_wsgi
parent process. So mod_wsgi shouldn't be interfering with anything it
does internally.
You also haven't said what pdftk sends the signal to, or who it
expects to receive the signal from. At what times does pdftk expect to
receive such a signal, ie., how often or through what other trigger.
Graham
http://www.thescripts.com/forum/threadedpost3010753.html#post3010753
indicating you are still chasing this.
Have you tried not using os.system() and use instead the popen2 module.
This works somewhat differently to os.system() and you may not see the
same issues.
You still haven't really explained about what generates the signals
and what their destination is.
Graham