From owner-freebsd-hackers Mon Oct 11 1:59:19 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from relay.ucb.crimea.ua (relay.ucb.crimea.ua [212.110.138.1]) by hub.freebsd.org (Postfix) with ESMTP id 96C0814D32 for ; Mon, 11 Oct 1999 01:56:53 -0700 (PDT) (envelope-from ru@ucb.crimea.ua) Received: (from ru@localhost) by relay.ucb.crimea.ua (8.9.3/8.9.3/UCB) id LAA41874; Mon, 11 Oct 1999 11:55:06 +0300 (EEST) (envelope-from ru) Date: Mon, 11 Oct 1999 11:55:06 +0300 From: Ruslan Ermilov To: Zhihui Zhang Cc: freebsd-hackers@FreeBSD.org Subject: Re: How to prevent a system call from restart? Message-ID: <19991011115506.A34243@relay.ucb.crimea.ua> Mail-Followup-To: Zhihui Zhang , freebsd-hackers@FreeBSD.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i In-Reply-To: ; from Zhihui Zhang on Sun, Oct 10, 1999 at 03:16:43PM -0400 X-Operating-System: FreeBSD 3.3-STABLE i386 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Oct 10, 1999 at 03:16:43PM -0400, Zhihui Zhang wrote: > > I modify the day time client program from the Stevens' book and run it on > both a Sun workstation and a FreeBSD machine. In the program, I use > signal() and alarm() to set a 5 seconds timeout. The program works as > expected on Sun (after I comment out the daytime line in the file > /etc/inetd.conf) but not on the FreeBSD machine. > > Later I find out that the reason maybe the recvfrom() restarts > *automatically* in FreeBSD. Why the default behaviour is different from > SunOS? If I am correct about the reason, can anyone tell me how to prevent > the recvfrom() from restart after receiving the SIGALRM signal? > > By the way, I also try the socket timeout option. It works immediately. > > Any help is appreciated. > Refer to the siginterrupt(3) manpage, it has all info you are looking for. Cheers, -- Ruslan Ermilov Sysadmin and DBA of the ru@ucb.crimea.ua United Commercial Bank, ru@FreeBSD.org FreeBSD committer, +380.652.247.647 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message