*BSD News Article 37870


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!uwm.edu!cs.utexas.edu!not-for-mail
From: summer@zeus.datasrv.co.il (4th Dimension)
Newsgroups: comp.unix.bsd
Subject: Does the KEEPALIVE option work for stream socket in SunOS
Date: 14 Nov 1994 10:45:16 -0600
Organization: UTexas Mail-to-News Gateway
Lines: 14
Sender: nobody@cs.utexas.edu
Message-ID: <199411141645.AA24934@zeus.datasrv.co.il>
NNTP-Posting-Host: news.cs.utexas.edu

I created two simple socket programs: client and server.
(on the server program I used the KEEPALIVE option with setsockopt)
As soon as the server succeeded in the accept system call,
I disconnected the client machine from the network.
However when I called to write from the server program, the write system call succeeded. 
After about 10 minutes of trying, the write return with -1 as expected.
Why didn't the write return immediately?

Please answer by E-mail
  summer@zeus.datasrv.co.il

Thanks
  Yoram Bar-On