Commit e5048d15 authored by Gonglei's avatar Gonglei Committed by Michael Tokarev

os-posix: report error message when lock file failed

It will cause that create vm failed When manager
tool is killed forcibly (kill -9 libvirtd_pid),
the file not was unlink, and unlock. It's better
that report the error message for users.
Signed-off-by: default avatarHuangweidong <>
Signed-off-by: default avatarGonglei <>
Reviewed-by: default avatarPaolo Bonzini <>
Signed-off-by: default avatarMichael Tokarev <>
parent 97699eff
......@@ -319,6 +319,8 @@ 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));
return -1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment