[Twisted-Python] can I detect a child stopped?

Using processProtocol. If a child is stopped (e.g., by SIGSTOP), is there some way to detect this?

On 03:47 pm, ndbecker2@gmail.com wrote:
The parent will get a SIGCHLD when the child gets SIGSTOP or SIGCONT. Using sigaction, you can learn which process was affected, and in what way. We don't have a sigaction wrapper that provides this functionality, though (the stdlib signal.signal actually wraps sigaction, but it doesn't expose any more functionality than you get from signal(2)). Jean-Paul

On 4 Dec, 07:10 pm, ndbecker2@gmail.com wrote:
No, at least not with `signal.signal`, because the necessary information isn't exposed by Python. You need to get the siginfo_t that sigaction(2) provides, but isn't exposed to Python. If there were a module exposing that functionality, then you could perhaps work something out. If such a module were generally available, Twisted could even try using it to provide this functionality out of the box. Jean-Paul

On 03:47 pm, ndbecker2@gmail.com wrote:
The parent will get a SIGCHLD when the child gets SIGSTOP or SIGCONT. Using sigaction, you can learn which process was affected, and in what way. We don't have a sigaction wrapper that provides this functionality, though (the stdlib signal.signal actually wraps sigaction, but it doesn't expose any more functionality than you get from signal(2)). Jean-Paul

On 4 Dec, 07:10 pm, ndbecker2@gmail.com wrote:
No, at least not with `signal.signal`, because the necessary information isn't exposed by Python. You need to get the siginfo_t that sigaction(2) provides, but isn't exposed to Python. If there were a module exposing that functionality, then you could perhaps work something out. If such a module were generally available, Twisted could even try using it to provide this functionality out of the box. Jean-Paul
participants (2)
-
exarkun@twistedmatrix.com
-
Neal Becker