s3:smbd: let smbd_server_connection_loop_once() check for select errors
authorStefan Metzmacher <metze@samba.org>
Mon, 24 Jan 2011 08:53:50 +0000 (09:53 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 24 Jan 2011 08:55:51 +0000 (09:55 +0100)
metze

source3/smbd/process.c

index f7b0f4cfcef3ff1224009123653665c13c190b20..55b364a90bd02267dcc563ed6b6e08a64e9ed6a1 100644 (file)
@@ -837,16 +837,16 @@ static NTSTATUS smbd_server_connection_loop_once(struct smbd_server_connection *
                errno = sav;
        }
 
-       if (run_events(smbd_event_context(), selrtn, &r_fds, &w_fds)) {
-               return NT_STATUS_RETRY;
-       }
-
        /* Check if error */
-       if (selrtn == -1) {
+       if (selrtn == -1 && errno != EINTR) {
                /* something is wrong. Maybe the socket is dead? */
                return map_nt_error_from_unix(errno);
        }
 
+       if (run_events(smbd_event_context(), selrtn, &r_fds, &w_fds)) {
+               return NT_STATUS_RETRY;
+       }
+
        /* Did we timeout ? */
        if (selrtn == 0) {
                return NT_STATUS_RETRY;