My process a.out is starting by a timeout command similar to:
timeout 1 ./a.out - < file.txt
It runs on a server and I have no control over that because it is part of a shell script that being invoked by the server automatically.
Is there any possibility or solution that I can implement so that a.out won't get killed until it finishes?
- I already mapped signal 15 (SIGTERM) by SIG_IGN macro, so it runs about 5s instead of 1s.
- If I send SIGKILL to
timeoutthen both gets killed. - Sending SIGSTOP and SIGHUP to timeout seems to have no effect.
I searched a lot regarding this matter, but all questions and texts seems to be on timeout usage. Is there anything else I can do? like another signal, forking, preventing timeout to get time correctly, blocking signals, doing something in inline assembly, anything at all?
Thank you.