Revision 4144f122
b/qemu-ga.c | ||
---|---|---|
247 | 247 |
pidfd = open(pidfile, O_CREAT|O_WRONLY, S_IRUSR|S_IWUSR); |
248 | 248 |
if (pidfd == -1 || lockf(pidfd, F_TLOCK, 0)) { |
249 | 249 |
g_critical("Cannot lock pid file, %s", strerror(errno)); |
250 |
if (pidfd != -1) { |
|
251 |
close(pidfd); |
|
252 |
} |
|
250 | 253 |
return false; |
251 | 254 |
} |
252 | 255 |
|
Also available in: Unified diff