strace: Process 204408 attached restart_syscall(<... resuming interrupted read ...>) = 0 poll([{fd=3, events=POLLIN|POLLPRI}], 1, 0) = 1 ([{fd=3, revents=POLLIN}]) read(3, "=\0\0\0\377\207\7#08S01Connection killed b"..., 8192) = 65 poll([{fd=3, events=POLLIN|POLLPRI}], 1, 0) = 1 ([{fd=3, revents=POLLIN}]) read(3, "", 8192) = 0 shutdown(3, SHUT_RDWR) = 0 close(3) = 0 socket(AF_INET, SOCK_STREAM, IPPROTO_TCP) = 3 fcntl(3, F_SETFL, O_RDONLY) = 0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(3, {sa_family=AF_INET, sin_port=htons(3306), sin_addr=inet_addr("192.168.1.1")}, 16) = -1 EINPROGRESS (Operation now in progress) fcntl(3, F_SETFL, O_RDWR) = 0 poll([{fd=3, events=POLLIN|POLLPRI}], 1, 2000) = 1 ([{fd=3, revents=POLLIN}]) getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 setsockopt(3, SOL_SOCKET, SO_RCVTIMEO, "\2003\341\1\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0 setsockopt(3, SOL_SOCKET, SO_SNDTIMEO, "\2003\341\1\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0 setsockopt(3, SOL_IP, IP_TOS, [8], 4) = 0 setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = 0 setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0 setsockopt(3, SOL_SOCKET, SO_RCVTIMEO, "\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0 setsockopt(3, SOL_SOCKET, SO_SNDTIMEO, "\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0 poll([{fd=3, events=POLLIN}], 1, 2000) = 1 ([{fd=3, revents=POLLIN}]) read(3, "S\0\0\0\n5.6.38-83.0-log\0\33P\273\31U\37#KDU?"..., 16384) = 87 write(3, "a\0\0\1\217\242\16\0\0\0\0@!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 101) = 101 read(3, "\7\0\0\2\0\0\0\2\0\0\0", 16384) = 11 poll([{fd=3, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout) write(3, "\23\0\0\0\3SELECT 1 FROM dual", 23) = 23 read(3, "\1\0\0\1\1\27\0\0\2\3def\0\0\0\0011\0\f?\0\1\0\0\0\10\201\0\0\0\0"..., 16384) = 56 write(1, "Result: 1\n", 10) = 10 write(3, "\1\0\0\0\1", 5) = 5 shutdown(3, SHUT_RDWR) = 0 close(3) = 0 write(1, "Done.\n", 6) = 6 ...