Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Dec 2000 09:45:05 -0800
From:      Alfred Perlstein <bright@wintelcom.net>
To:        Dmitry Dicky <diwil@dataart.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: recvfrom() and signals
Message-ID:  <20001219094505.P19572@fw.wintelcom.net>
In-Reply-To: <XFMail.001219200110.diwil@dataart.com>; from diwil@dataart.com on Tue, Dec 19, 2000 at 08:01:10PM %2B0300
References:  <XFMail.001219200110.diwil@dataart.com>

next in thread | previous in thread | raw e-mail | index | archive | help
* Dmitry Dicky <diwil@dataart.com> [001219 09:01] wrote:
> 
> I use non blocking socket and it receives data with no problems.
> When alarm occures, the signal delivered to the process and alarm handler
> prints a signal number. As I understand after this recvfrom should
> return -1 and errno should be set to EINTR.
> 
> BUt, upon signal delivery (actually any signal, CHLD for example)
> recvfrom() still hangs the program execution and awaits data.
> 
> However, man pages say that recvfrom() will return -1 if the call has been
> interrupted.
> 
> Is this a system bug or just my misunderstanding?

See the sigaction manpage and how one enable/disables system call
restarts.

-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001219094505.P19572>