Re: Sending signal on fd close
From: Rafal (mail_at_iceberg.pl)
Date: Sun, 22 May 2005 19:16:44 +0000 (UTC)
On 2005-05-22, email@example.com <firstname.lastname@example.org> wrote:
> I think that you need to do fcntlt(F_SETSIG) to get SIGIO when the fd
> closes. Of course you'll get it whenever anything happens on the fd.
> Install a signal handler for SIGIO that does nothing (or nearly
> nothing). Then, hopefully, semop() will return with errno=EINTR when
> the signal arrives.
Yes, but as far as I understand, the SIGIO signal will arrive whenever fd is
ready for input/output and on errors - how do I recognize that connection was
-- /"\ Rafał Krypa \ / =========== X ASCII Ribbon Campaign / \ against HTML mail