This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: connect() not interrupted by sigalrm?

> Thanks, Elfyn,
> > I believe I have found the problem. In order for your program to work as
> > expected you will need SA_INTERRUPT , which is not defined in
> > /usr/include/sys/signal.h . So it just laggs until it gets to the
> > unreachable" error. I'm not to sure the reason why it's not there (?).
> The SA_INTERRUPT flag was used by older systems such as Solaris 2.4,
> where, contrary to current expectations, all interrupted system calls
> were automatically restarted. On those systems, if you set the
> SA_INTERRUPT flag, the call would not be restarted, giving the
> behavior we now expect. (i.e. its behavior is the opposite of the
> SA_RESTART flag that we ordinarily use now to ensure restart of an
> interrupted system call. See Stevens Unix Network Programming, p. 121).
> So unless this is the official answer, I am doubtful that this is the
> actual problem, since by default, connect() should be interrupted by

Ooops. I'm obviously showing my signal programming weakness' now. I'll shut
up ;-)


Elfyn McBratney
elfyn at exposure dot org dot uk

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]