[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PULL 08/23] Revert "os-posix: report error message when
From: |
Michael Tokarev |
Subject: |
[Qemu-trivial] [PULL 08/23] Revert "os-posix: report error message when lock file failed" |
Date: |
Sun, 2 Nov 2014 14:57:20 +0300 |
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 <address@hidden>
---
os-posix.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/os-posix.c b/os-posix.c
index 4898ebf..e31a099 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;
}
--
1.7.10.4
- [Qemu-trivial] [PULL 01/23] tests: Add missing include to test-bitops.c, (continued)
- [Qemu-trivial] [PULL 01/23] tests: Add missing include to test-bitops.c, Michael Tokarev, 2014/11/02
- [Qemu-trivial] [PULL 02/23] bitops.h: Don't include qemu-common.h, Michael Tokarev, 2014/11/02
- [Qemu-trivial] [PULL 11/23] virtio-9p-proxy: Fix sockfd leak, Michael Tokarev, 2014/11/02
- [Qemu-trivial] [PULL 03/23] bitmap.h: Don't include qemu-common.h, Michael Tokarev, 2014/11/02
- [Qemu-trivial] [PULL 04/23] target-xtensa: mark XtensaConfig structs as unused, Michael Tokarev, 2014/11/02
- [Qemu-trivial] [PULL 17/23] pidfile: stop making pidfile error a special case, Michael Tokarev, 2014/11/02
- [Qemu-trivial] [PULL 12/23] virtio-9p-proxy: fix error return in proxy_init(), Michael Tokarev, 2014/11/02
- [Qemu-trivial] [PULL 07/23] util: Improve os_mem_prealloc error message, Michael Tokarev, 2014/11/02
- [Qemu-trivial] [PULL 05/23] target-arm: A64: remove redundant store, Michael Tokarev, 2014/11/02
- [Qemu-trivial] [PULL 06/23] sparse: fix build, Michael Tokarev, 2014/11/02
- [Qemu-trivial] [PULL 08/23] Revert "os-posix: report error message when lock file failed",
Michael Tokarev <=
- [Qemu-trivial] [PULL 23/23] vdi: wrapped uuid_unparse() in #ifdef, Michael Tokarev, 2014/11/02
- [Qemu-trivial] [PULL 09/23] net/slirp: specify logbase for smbd, Michael Tokarev, 2014/11/02
- [Qemu-trivial] [PULL 15/23] os-posix: use global daemon_pipe instead of cryptic fds[1], Michael Tokarev, 2014/11/02
- [Qemu-trivial] [PULL 22/23] tap: fix possible fd leak in net_init_tap, Michael Tokarev, 2014/11/02
- [Qemu-trivial] [PULL 13/23] virtio-9p-proxy: improve error messages in connect_namedsocket(), Michael Tokarev, 2014/11/02
- [Qemu-trivial] [PULL 21/23] tap: do not close(fd) in net_init_tap_one, Michael Tokarev, 2014/11/02
- [Qemu-trivial] [PULL 18/23] os-posix: reorder parent notification for -daemonize, Michael Tokarev, 2014/11/02
- [Qemu-trivial] [PULL 10/23] target-tricore: check return value before using it, Michael Tokarev, 2014/11/02
- [Qemu-trivial] [PULL 20/23] target-i386: Remove unused model_features_t struct, Michael Tokarev, 2014/11/02
- [Qemu-trivial] [PULL 19/23] tap_int.h: remove repeating NETWORK_SCRIPT defines, Michael Tokarev, 2014/11/02