summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/process.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index f2aa23e3e0..99c98e3a37 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -48,8 +48,12 @@ static bool smbd_lock_socket_internal(struct smbd_server_connection *sconn)
DEBUG(10,("pid[%d] wait for socket lock\n", (int)sys_getpid()));
- ok = fcntl_lock(sconn->smb1.echo_handler.socket_lock_fd,
+ do {
+ ok = fcntl_lock(
+ sconn->smb1.echo_handler.socket_lock_fd,
SMB_F_SETLKW, 0, 0, F_WRLCK);
+ } while (!ok && (errno == EINTR));
+
if (!ok) {
return false;
}
@@ -80,8 +84,12 @@ static bool smbd_unlock_socket_internal(struct smbd_server_connection *sconn)
return true;
}
- ok = fcntl_lock(sconn->smb1.echo_handler.socket_lock_fd,
+ do {
+ ok = fcntl_lock(
+ sconn->smb1.echo_handler.socket_lock_fd,
SMB_F_SETLKW, 0, 0, F_UNLCK);
+ } while (!ok && (errno == EINTR));
+
if (!ok) {
return false;
}