Created
October 22, 2014 17:57
-
-
Save daurnimator/38cec6b161543676391f to your computer and use it in GitHub Desktop.
Blocking read with O_NONBLOCK set? (please ignore sending xml to ssh :P)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dup(12) = 13 | |
getsockname(13, {sa_family=AF_INET, sin_port=htons(46811), sin_addr=inet_addr("127.0.0.1")}, [16]) = 0 | |
getsockopt(13, SOL_SOCKET, SO_TYPE, [1], [4]) = 0 | |
fstat(13, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0 | |
getsockname(13, {sa_family=AF_INET, sin_port=htons(46811), sin_addr=inet_addr("127.0.0.1")}, [16]) = 0 | |
getsockopt(13, SOL_SOCKET, SO_TYPE, [1], [4]) = 0 | |
fcntl(13, F_SETFD, FD_CLOEXEC) = 0 | |
fcntl(13, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK) | |
fcntl(13, F_SETFL, O_RDWR|O_NONBLOCK) = 0 | |
setsockopt(13, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 | |
setsockopt(13, SOL_SOCKET, SO_REUSEPORT, [0], 4) = 0 | |
setsockopt(13, SOL_TCP, TCP_NODELAY, [0], 4) = 0 | |
setsockopt(13, SOL_TCP, TCP_CORK, [0], 4) = 0 | |
fcntl(12, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK) | |
fcntl(12, F_SETFL, O_RDWR) = 0 | |
close(12) = 0 | |
getpeername(13, {sa_family=AF_INET, sin_port=htons(22), sin_addr=inet_addr("127.0.0.1")}, [16]) = 0 | |
sendto(13, "<stream:stream xmlns:stream='htt"..., 133, MSG_NOSIGNAL, NULL, 0) = 133 | |
read(13, "SSH-2.0-OpenSSH_6.6.1\r\n", 4096) = 23 | |
read(13, <unfinished ...> | |
+++ killed by SIGKILL +++ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
read()
at the end was blocking; even though O_NONBLOCK was set.(So I had to
kill -9
it)Why is this happening?