os-posix: remove confused errno

If we get inside the 'else if (status == 1)' conditional,
then we know that read() succeeded, and therefore errno is
unspecified. Printing strerror(errno) on a random value
is not helpful.

Cc: Eric Blake <eblake@redhat.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
Gonglei 2014-09-26 16:14:31 +08:00 committed by Michael Tokarev
parent 63ce8e150c
commit 97699eff3a
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ void os_daemonize(void)
exit(1);
}
else if (status == 1) {
fprintf(stderr, "Could not acquire pidfile: %s\n", strerror(errno));
fprintf(stderr, "Could not acquire pidfile\n");
exit(1);
} else {
exit(0);