-   Programming (
-   -   How to tell a C++ programme to quit ? (

yogeshm02 09-09-2005 02:42 AM

How to tell a C++ programme to quit ?
Hi !
I have written a small C++ programme & am loading it through a init script. I'm using kill to signal it to quit. Is there any better method by which the programme could know this and save its important data.

With regards

bigearsbilly 09-09-2005 03:45 AM

man signal

you can't stop the KILL signal.

addy86 09-09-2005 03:46 AM

You could send a less "devastating" signal to your program which can be cought. Have a look at man 1 kill and man 7 signal.

yogeshm02 09-09-2005 05:59 AM

Thanks for your reply.

I wanted a way for handling SIGTERM in my C++ prog. Now i know this after i downloaded "Advanced Unix Programming".

Thnaks again for your reply.

All times are GMT -5. The time now is 11:30 AM.