| 734 | } |
| 735 | |
| 736 | static void set_keep_alive(int sockfd) |
| 737 | { |
| 738 | int ka = 1; |
| 739 | |
| 740 | if (setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, &ka, sizeof(ka)) < 0) { |
| 741 | if (errno != ENOTSOCK) |
| 742 | logerror("unable to set SO_KEEPALIVE on socket: %s", |
| 743 | strerror(errno)); |
| 744 | } |
| 745 | } |
| 746 | |
| 747 | static int execute(void) |
| 748 | { |
no test coverage detected