]> sourceware.org Git - glibc.git/commitdiff
hurd: Fix shutdown() errno on non-sock
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 6 Jan 2025 17:03:10 +0000 (18:03 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 6 Jan 2025 17:03:16 +0000 (18:03 +0100)
sysdeps/mach/hurd/shutdown.c

index 272d8dcf2fae6bec26bc974d65149ffb885925b2..bf09c0fd29729aacc63bf988ec70adf47be6e01e 100644 (file)
@@ -32,7 +32,12 @@ int
 shutdown (int fd, int how)
 {
   error_t err = HURD_DPORT_USE (fd, __socket_shutdown (port, how));
+
+  if (err == MIG_BAD_ID || err == EOPNOTSUPP)
+    /* The file did not grok the ifsock protocol.  */
+    err = ENOTSOCK;
   if (err)
     return __hurd_dfail (fd, err);
+
   return 0;
 }
This page took 0.03766 seconds and 5 git commands to generate.