From cf3a9741dc7427efb97eff09a3c197a906ce6767 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 28 Sep 1998 21:43:48 +0000 Subject: Changes to test in configure if capabilities are enabled on a system. Changes to get Samba to compile cleanly with the IRIX compiler with the options : -fullwarn -woff 1209,1174 (the -woff options are to turn off warnings about unused function parameters and controlling loop expressions being constants). Split prototype generation as we hit a limit in IRIX nawk. Removed "." code in smbd/filename.c (yet again :-). Jeremy. (This used to be commit e0567433bd72aec17bf5a54cc292701095d25f09) --- source3/locking/shmem.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source3/locking/shmem.c') diff --git a/source3/locking/shmem.c b/source3/locking/shmem.c index f1c985881b..b63db1f168 100644 --- a/source3/locking/shmem.c +++ b/source3/locking/shmem.c @@ -384,7 +384,6 @@ static BOOL smb_shm_unregister_process(char *processreg_file, pid_t pid) int nb_read; pid_t other_pid; SMB_OFF_T seek_back = -((SMB_OFF_T)sizeof(other_pid)); - SMB_OFF_T erased_slot; BOOL found = False; @@ -404,7 +403,12 @@ static BOOL smb_shm_unregister_process(char *processreg_file, pid_t pid) DEBUG(5,("smb_shm_unregister_process : erasing record for pid %d (seek_val = %.0f)\n", (int)other_pid, (double)seek_back)); other_pid = (pid_t)0; - erased_slot = sys_lseek(smb_shm_processes_fd, seek_back, SEEK_CUR); + if(sys_lseek(smb_shm_processes_fd, seek_back, SEEK_CUR) == -1) + { + DEBUG(0,("ERROR smb_shm_unregister_process : processreg_file sys_lseek failed with code %s\n",strerror(errno))); + close(smb_shm_processes_fd); + return False; + } if(write(smb_shm_processes_fd, &other_pid, sizeof(other_pid)) < 0) { DEBUG(0,("ERROR smb_shm_unregister_process : processreg_file write failed with code %s\n",strerror(errno))); -- cgit