diff options
| author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2025-01-06 18:03:10 +0100 |
|---|---|---|
| committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2025-01-06 18:03:16 +0100 |
| commit | 6ab5980f4cf973051c0fde8e6bec9ca9b59c3d66 (patch) | |
| tree | c0e45144ec997e4017f98bfd12b44cf3a8b7c958 | |
| parent | ff806e9233e3e1ae08834dd23d609399712953b3 (diff) | |
| download | glibc-6ab5980f4cf973051c0fde8e6bec9ca9b59c3d66.tar.xz glibc-6ab5980f4cf973051c0fde8e6bec9ca9b59c3d66.zip | |
hurd: Fix shutdown() errno on non-sock
| -rw-r--r-- | sysdeps/mach/hurd/shutdown.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/shutdown.c b/sysdeps/mach/hurd/shutdown.c index 272d8dcf2f..bf09c0fd29 100644 --- a/sysdeps/mach/hurd/shutdown.c +++ b/sysdeps/mach/hurd/shutdown.c @@ -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; } |
