Why doesn't os.system ignore SIGINT?
I am reading Linux System Programming.
When introducing the system(command) function, the book states that during
execution of the command, SIGINT is ignored.
So, assuming that os.system is just a wrapper of the underlying system
function, I try the following:
loop.py
while True: print 'You should not be able to CTRL+C me ;p'
test_loop.py
import os os.system("python loop.py")
Now that I'm executing loop.py with system, I'm expecting SIGINT to be
ignored, but when I use CTRL+C on the running program it still get killed.
Any idea why os.system differ from the system() function?
No comments:
Post a Comment