aboutsummaryrefslogtreecommitdiff
path: root/os-posix.c
diff options
context:
space:
mode:
authorMichael Tokarev <mjt@tls.msk.ru>2014-10-24 11:33:00 +0400
committerMichael Tokarev <mjt@tls.msk.ru>2014-11-02 10:04:34 +0300
commit2fd7ae36c5403b14e9c676627a1a0dd2b76b9e1b (patch)
tree23714ca30f9727871df3fcf792d4d0cbb96a7a96 /os-posix.c
parent404ac83efd5761c6b590fd9f00fbbe8ee2281aa6 (diff)
Revert "os-posix: report error message when lock file failed"
This reverts commit e5048d15ce6addae869f23514b2a1f0d4466418a. qemu_create_pidfile() is only created from main(), and there, if that function returns failure, os_pidfile_error() function is called, to, guess that, report error (which is done differently whenever we're daemonizing or not). qemu_create_pidfile() function has several error returns, this lockf() failure is one of them, there are others (another shown in the patch context too). So this patch makes whole thing inconsistent at least. If we need to show error message when we're daemonizing, it looks like we should modify os_pidfile_error() routine to always report error and only after that check for daemon mode. This way all errors will be reported the same way. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'os-posix.c')
-rw-r--r--os-posix.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/os-posix.c b/os-posix.c
index 4898ebf4a2..e31a099a2b 100644
--- a/os-posix.c
+++ b/os-posix.c
@@ -319,8 +319,6 @@ int qemu_create_pidfile(const char *filename)
return -1;
}
if (lockf(fd, F_TLOCK, 0) == -1) {
- fprintf(stderr, "lock file '%s' failed: %s\n",
- filename, strerror(errno));
close(fd);
return -1;
}