diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-07-05 02:32:44 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-07-05 02:32:44 +0200 |
commit | 414f6c35a62a7e72f40c39089a9952913a7eeb90 (patch) | |
tree | f66ec26b1df7cc7e4e1cab491787a6721a472bcc /pflocal | |
parent | 750b3b1619e55117d3070a0deeda80ae2b88afca (diff) | |
download | hurd-414f6c35a62a7e72f40c39089a9952913a7eeb90.tar.gz hurd-414f6c35a62a7e72f40c39089a9952913a7eeb90.tar.bz2 hurd-414f6c35a62a7e72f40c39089a9952913a7eeb90.zip |
pflocal: return ENOTCONN on get/setpot(SO_SNDBUF) on unconnected socket
EPIPE would raise SIGPIPE, which applications do not expect to happen on
a mere get/setsockopt.
* pflocal/socket.c (S_socket_getopt, S_socket_setopt): Return ENOTCONN
instead of EPIPE.
Diffstat (limited to 'pflocal')
-rw-r--r-- | pflocal/socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pflocal/socket.c b/pflocal/socket.c index 2baa1efe..8f90da2d 100644 --- a/pflocal/socket.c +++ b/pflocal/socket.c @@ -466,7 +466,7 @@ S_socket_getopt (struct sock_user *user, pipe = sock->read_pipe; if (!pipe) { - ret = EPIPE; + ret = ENOTCONN; break; } *(int *)*value = pipe->write_limit; @@ -481,7 +481,7 @@ S_socket_getopt (struct sock_user *user, pipe = sock->write_pipe; if (!pipe) { - ret = EPIPE; + ret = ENOTCONN; break; } *(int *)*value = pipe->write_limit; @@ -560,7 +560,7 @@ S_socket_setopt (struct sock_user *user, pipe = sock->read_pipe; if (!pipe) { - ret = EPIPE; + ret = ENOTCONN; break; } @@ -594,7 +594,7 @@ S_socket_setopt (struct sock_user *user, pipe = sock->write_pipe; if (!pipe) { - ret = EPIPE; + ret = ENOTCONN; break; } |