mirror of https://github.com/krallin/tini.git
parent
109019f917
commit
e7bae983c6
2 changed files with 43 additions and 1 deletions
@ -0,0 +1,18 @@ |
|||||||
|
#!/usr/bin/env python |
||||||
|
import os |
||||||
|
import subprocess |
||||||
|
import signal |
||||||
|
|
||||||
|
|
||||||
|
def reset_sig_handler(): |
||||||
|
signal.signal(signal.SIGUSR1, signal.SIG_DFL) |
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__": |
||||||
|
signal.signal(signal.SIGUSR1, signal.SIG_IGN) |
||||||
|
p = subprocess.Popen( |
||||||
|
["sleep", "1000"], |
||||||
|
preexec_fn=reset_sig_handler |
||||||
|
) |
||||||
|
p.wait() |
||||||
|
|
Loading…
Reference in new issue