Date: Sun, 10 Oct 1999 15:16:43 -0400 (EDT) From: Zhihui Zhang <zzhang@cs.binghamton.edu> To: freebsd-hackers@freebsd.org Subject: How to prevent a system call from restart? Message-ID: <Pine.GSO.3.96.991010150931.28616A-100000@sol.cs.binghamton.edu>
next in thread | raw e-mail | index | archive | help
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. -Zhihui 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?Pine.GSO.3.96.991010150931.28616A-100000>