Changeset 23359
- Timestamp:
- 09/06/07 15:24:34 (15 months ago)
- Location:
- trunk/launchd/src
- Files:
-
- 3 modified
-
launchd_core_logic.c (modified) (1 diff)
-
launchd_runtime.c (modified) (1 diff)
-
launchd_runtime.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/launchd/src/launchd_core_logic.c
r23356 r23359 4493 4493 4494 4494 if (logfile_fd != -1) { 4495 job_assumes(j, fcntl(logfile_fd, F_FULLFSYNC, 0) != -1);4495 job_assumes(j, runtime_fsync(logfile_fd) != -1); 4496 4496 job_assumes(j, runtime_close(logfile_fd) != -1); 4497 4497 } -
trunk/launchd/src/launchd_runtime.c
r23357 r23359 1037 1037 { 1038 1038 if (ourlogfile) { 1039 fflush(ourlogfile); 1040 1041 if (debug_shutdown_hangs) { 1042 fcntl(fileno(ourlogfile), F_FULLFSYNC, NULL); 1043 } 1039 launchd_assumes(fflush(ourlogfile) == 0); 1040 launchd_assumes(runtime_fsync(fileno(ourlogfile)) != -1); 1041 } 1042 } 1043 1044 int 1045 runtime_fsync(int fd) 1046 { 1047 if (debug_shutdown_hangs) { 1048 return fcntl(fd, F_FULLFSYNC, NULL); 1049 } else { 1050 return fsync(fd); 1044 1051 } 1045 1052 } -
trunk/launchd/src/launchd_runtime.h
r23356 r23359 62 62 63 63 int runtime_close(int fd); 64 int runtime_fsync(int fd); 64 65 65 66 void runtime_set_timeout(timeout_callback to_cb, mach_msg_timeout_t to);

