This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [Hurd] MSG_NOSIGNAL implementation


First, about the constant's value.  Don't add a new file, just use the
existing bsd4.4 file.  Remember, being in that sysdeps directory doesn't
really mean "what 4.4BSD had"--it just means what all the actual glibc
configurations that inherit that file need.  That file does have the
things that the BSDs had in common before they diverged, because the
file was there since before they did.  For things added later, I think
in the past I have used NetBSD values.  Do that.  If there is a working
configuration for freebsd in the future (or in an add-on port), it can
add a new divergent file.

Second, about the implementation.  A style nit, put & expressions inside
().  Even when we really do know the precedence rules, they aren't
obvious.  A more substantive style point: don't repeat that magic in all
those places, have it shared in a new inline.  The actually substantive
point: that code is wrong.  MSG_NOSIGNAL affects the EPIPE/SIGPIPE case
only.  It should not affect the SIGLOST case.  So, something like:

	_HURD_FD_H_EXTERN_INLINE int
	__hurd_sockfail (int fd, int flags, error_t err)
	{
	  if (!(flags & MSG_NOSIGNAL) || err != EPIPE)
	    err = _hurd_fd_error (fd, err);
	  errno = err;
	  return -1;
	}


Thanks,
Roland


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