diff options
author | Michael Tokarev <mjt@tls.msk.ru> | 2014-10-30 17:40:48 +0300 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2014-11-02 10:04:34 +0300 |
commit | fee78fd6d2f8dfdfd447a33c34323dd5bd3193a2 (patch) | |
tree | 612837d9d5e1c36af4a6fbbe3a007c4ca17ff50b /os-win32.c | |
parent | ccea25f1c7cd3f0b12d878a5294620f5478729f8 (diff) | |
download | qemu-fee78fd6d2f8dfdfd447a33c34323dd5bd3193a2.zip qemu-fee78fd6d2f8dfdfd447a33c34323dd5bd3193a2.tar.gz qemu-fee78fd6d2f8dfdfd447a33c34323dd5bd3193a2.tar.bz2 |
pidfile: stop making pidfile error a special case
In case of -daemonize, we write non-zero to the daemon
pipe only if pidfile creation failed, so the parent will
report error about pidfile problem. There's no need to
make special case for this, since all other errors are
reported by the child just fine. Let the parent report
error and simplify logic in os_daemonize().
This way, we don't need os_pidfile_error() function, since
it only prints error now, so put the error reporting printf
into the only place where qemu_create_pidfile() is called,
in vl.c.
While at it, fix wrong indentation in os_daemonize().
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'os-win32.c')
-rw-r--r-- | os-win32.c | 5 |
1 files changed, 0 insertions, 5 deletions
@@ -104,11 +104,6 @@ void os_parse_cmd_args(int index, const char *optarg) return; } -void os_pidfile_error(void) -{ - fprintf(stderr, "Could not acquire pid file: %s\n", strerror(errno)); -} - int qemu_create_pidfile(const char *filename) { char buffer[128]; |