[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: signal() behavior

Seems to me that we can do away with this whole socket pair business if we
just close all the listeners on shutdown (as is done when -DHAVE_WINSOCK)
is defined...


#define sock_errstr()	STRERROR(errno)

is bogus!

errno may change from the time it was saved in the local variable and
the time it is printed.  Hence, sock_errstr must be written to expect
the local variable.

	err = sock_errno();
	printf("error e=%d s=%s\n", err, sock_errstr(err));