Date: Tue, 23 Mar 1999 09:26:00 +1200 (NZST) From: Jonathan Chen <jonc@pinnacle.co.nz> To: Masahiro Ariga <mariga@cd.mbn.or.jp> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: how to die gracefully Message-ID: <Pine.SC5.4.10.9903230922320.26685-100000@kiwi.pinnacle.co.nz> In-Reply-To: <000501be7472$3bbeb400$064ca8c0@gateway>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 22 Mar 1999, Masahiro Ariga wrote:
> 1.How should I exit gracefully by pushing Ctl^C. I mean,what should I do to
> recover normal condition in preparation for next execution ?
> 2.I like to catch the signal when pushed Ctl^C,and make a handler
> routine.Would you tell me what signal I can catch when enterring Ctl^C ?
You need to read up on catching signals. Check out:
sigemptyset
sigaddset
sigprocmask
sigaction
These can be a bit hard to read; an easier option is to get
"Advanced Programming in the UNIX Environment" by Stevens. It explains
all you need to know.
Jonathan Chen
----------------------------------------------------------------------
When you want to test the depth of a stream,
don't use both feet.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SC5.4.10.9903230922320.26685-100000>
