D
Dave Cook
Why doesn't my excepthook get called in the child process?
import sys
import multiprocessing as mp
def target():
name = mp.current_process().name
def exceptHook(*args):
print 'exceptHook:', name, args
sys.excepthook = exceptHook
raise ValueError
if __name__=='__main__':
p = mp.Process(target=target)
p.start()
p.join()
# try it here in main
target()
Thanks,
Dave Cook
import sys
import multiprocessing as mp
def target():
name = mp.current_process().name
def exceptHook(*args):
print 'exceptHook:', name, args
sys.excepthook = exceptHook
raise ValueError
if __name__=='__main__':
p = mp.Process(target=target)
p.start()
p.join()
# try it here in main
target()
Thanks,
Dave Cook