1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-30 19:42:05 +03:00

Don't hold the mutex for more than 20 seconds.

Jeremy.
This commit is contained in:
Jeremy Allison
-
parent 144f0481c8
commit 1b9f1a368f
3 changed files with 37 additions and 7 deletions

View File

@ -53,7 +53,7 @@ BOOL do_file_lock(int fd, int waitsecs, int type)
alarm(waitsecs);
ret = fcntl(fd, SMB_F_SETLKW, &lock);
alarm(0);
CatchSignal(SIGALRM, SIGNAL_CAST SIG_DFL);
CatchSignal(SIGALRM, SIGNAL_CAST SIG_IGN);
if (gotalarm) {
DEBUG(0, ("do_file_lock: failed to %s file.\n",