forked from pool/boinc-client
5024a320b2
fix for bnc#689499 OBS-URL: https://build.opensuse.org/request/show/102548 OBS-URL: https://build.opensuse.org/package/show/network/boinc-client?expand=0&rev=17
16 lines
522 B
Diff
16 lines
522 B
Diff
Index: sched/handle_request.cpp
|
|
===================================================================
|
|
--- sched/handle_request.cpp.orig
|
|
+++ sched/handle_request.cpp
|
|
@@ -143,7 +143,9 @@ int lock_sched() {
|
|
// write PID into the CGI_<HOSTID> file and flush to disk
|
|
//
|
|
count = sprintf(pid_string, "%d\n", getpid());
|
|
- write(fd, pid_string, count);
|
|
+ if( write(fd, pid_string, count) < 0 ) {
|
|
+ perror("Cannot write PID to host-file") ; exit(errno) ;
|
|
+ };
|
|
fsync(fd);
|
|
|
|
g_reply->lockfile_fd = fd;
|