I have code like this:
from multiprocessing import Process
proc = Process(target=some_blocking_callable)
proc.start()
time.sleep(1)
proc.terminate()
It works well, but it seems the termination (by SIGTERM
) causes an error message and stack trace to be printed to stderr:
*** Aborted at 1611012345 (unix time) try "date -d @1611012345" if you are using GNU date ***
*** SIGTERM (@0x1beb001cd21c) received by PID 2814123 (TID 0x7fefa035b740) from PID 2814123; stack trace: ***
<very long stack trace>
Is there a way to completely suppress this error, and/or all stderr
/stdout
output from proc
?