How to handle interruped sys call "connect" ?

elee6i5 at jetson.uh.edu elee6i5 at jetson.uh.edu
Tue Oct 30 16:28:04 AEST 1990


I am trying to set up a system wherein a client tries to send many files
for a remote server's consumption. The way I go about is
	- open a new socket
	- connect
	- fork a child to send data
   The parent contiues this in a loop. The children after sending the
   data close their sockets.

But the parent should also close the sockets on which data transfer has been
completed in order to clear up the system table entry. 
I tried doing it this way. 
The parent traps SIG_CLD and the handler identifies the exiting child
and closes the corresponding socket. 

Now the question is how to handle interruped system call "connect"
When connect is retried (called again) if it returns with EINTR,
it fails again  with EISCONN (socket already connected or previous
connect attempt not completed ;  whatever it means)

Can some explain this and suggest (email) how to handle interrupted
call to connect ?

Thanks in advance,

.sundar
elee6i5 at jetson.uh.edu



More information about the Comp.unix.questions mailing list