Subject: EINTR received during connect when opening a remote folder.

From: [email-masked] (Makr Keasling)
Date: Tue, 19 Jan 93 13:03:11 PST

Here is the error message:
!! Can't connect to set,143: Interrupted system call
									
my fix is to:

MAILSTREAM *my_mail_open (MAILSTREAM *stream, char *mailbox)
{
  int mask = sigblock (sigmask (SIGCHLD));
  stream = mail_open (stream, mailbox, 0);
  sigsetmask (mask);
  return stream;
}

I need to receive SIGCHLD's because I am running processes in the "background"
and need to know when they are finished.  The SIGCHLD that is received is
from the process that gets forked when trying to connect via /etc/rimapd.
The problem occurs when network latency is high.

I would like to know if there is a better, more portable solution to this
problem.

Mark Keasling
[email-masked]

---

From: Mark Crispin <[email-masked]>
Date: Wed, 20 Jan 1993 22:35:58 -0800 (PST)

> I would like to know if there is a better, more portable solution to this

You probably have to defer any signal which may adversely impact TCP every
time you call c-client.  I'm sure SIGCHLD isn't the only one; nor is TCP open
the only thing that can be adversely impacted by a signal at the wrong time.
This is a deficiency in the Unix kernel.  Ideally, a signal should just call
the signal handler and let you resume the TCP system call (perhaps by backing
out into user mode so redoing the system call resumes the operation).  Very
few operating systems do this right; ITS (R.I.P.) is the only one I know of
that did.  ;-(

One possible way of dealing with the problem is by having the c-client part of
your application run in a separate child, so it would never get SIGCHLDs.  I
don't know how badly this may tangle your application though.

-- Mark --