Changeset 988 for vendor/current/lib/util/blocking.c
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/lib/util/blocking.c
r414 r988 22 22 */ 23 23 24 #include "includes.h" 25 #include "system/network.h" 24 #include "replace.h" 26 25 #include "system/filesys.h" 27 #include "system/locale.h" 28 #undef malloc 29 #undef strcasecmp 30 #undef strncasecmp 31 #undef strdup 32 #undef realloc 26 #include "blocking.h" 33 27 34 28 /** … … 61 55 #undef FLAG_TO_SET 62 56 } 57 58 59 _PUBLIC_ bool smb_set_close_on_exec(int fd) 60 { 61 #ifdef FD_CLOEXEC 62 int val; 63 64 val = fcntl(fd, F_GETFD, 0); 65 if (val >= 0) { 66 val |= FD_CLOEXEC; 67 val = fcntl(fd, F_SETFD, val); 68 if (val != -1) { 69 return true; 70 } 71 } 72 #endif 73 return false; 74 }
Note:
See TracChangeset
for help on using the changeset viewer.