2 ms·
A kill -9 wouldn't give you a chance to write the reason for termination to a file. It's the equivalent of the OS saying "you have already run your last CPU cyc
by Buttons840 8y ago
A kill -9 wouldn't give you a chance to write the reason for termination to a file. It's the equivalent of the OS saying "you have already run your last CPU cycle, you will receive zero more CPU cycles, good bye".
You might be able to write the word "bad" in a file, and then clear the file if your app closes nicely. If you start and find the word "bad" in the file, then you know you were killed. A slight variation of what you suggested.
- slededit 8y agoWhich is why the absence of a reason in the file is indication it was killed.
- Buttons840 8y agoYou're right.
- jacobsenscott 8y agoThat's what the empty file tells you.