bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ENOTSOCK


From: David Michael
Subject: ENOTSOCK
Date: Sun, 12 Mar 2017 19:43:40 -0700

Hi,

A few of the socket-related functions in glibc don't seem to return
ENOTSOCK.  Would it be more "correct" to return this as opposed to
EMIG_BAD_ID?  In particular, can at least send() be made to return
ENOTSOCK for PulseAudio compatibility?  The following example uses
both MIG_BAD_ID and EOPNOTSUPP as some other functions do, although
I've only seen it return EMIG_BAD_ID.

Thanks.

David

--- a/sysdeps/mach/hurd/send.c
+++ b/sysdeps/mach/hurd/send.c
@@ -33,6 +33,9 @@ __send (int fd, const void *buf, size_t n, int flags)
                                           NULL, MACH_MSG_TYPE_COPY_SEND, 0,
                                           NULL, 0, &wrote));

+  if (err == MIG_BAD_ID || err == EOPNOTSUPP)
+    err = ENOTSOCK;
+
   return err ? __hurd_sockfail (fd, flags, err) : wrote;
 }
 libc_hidden_def (__send)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]