[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: errno
From: |
Werner Koch |
Subject: |
Re: errno |
Date: |
Mon Jun 18 15:30:01 2001 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7 |
|| On Mon, 18 Jun 2001 11:07:47 +0300
|| Nikos Mavroyanopoulos <address@hidden> wrote:
nm> 1. Document it and request to install SIG_IGN for the SIGPIPE signal
before calling
nm> gnutls_handshake/gnutls_rehandshake.
nm> (that way we detect the error and behave as expected)
That is easy and maybe you should do it for now.
nm> 2. Check for pending alerts between reading two messages.
Argh....
nm> [this will not work if the peer closes the connection
nm> without an alert]
... this will happen.
nm> 3. Install the signal handler while doing handshake(), and restore
nm> it when leaving (I don't really like it)
IMHO, this is the best way and the reason why POSIX has a sound
specificaton of signals. Well, the OS just needs to be POSIX
compliant ;-) MT apps are still a problem but this is the case anyway
with MT.
You might want to provide a flag to disable signal catching so that
the default operation mode works inmost cases.
--
Werner Koch Omnis enim res, quae dando non deficit, dum habetur
g10 Code GmbH et non datur, nondum habetur, quomodo habenda est.
Privacy Solutions -- Augustinus
- errno, Nikos Mavroyanopoulos, 2001/06/18
- Re: errno,
Werner Koch <=
- Re: errno, Dan Winship, 2001/06/18
- errno, Nikos Mavroyanopoulos, 2001/06/19