]> git.proxmox.com Git - mirror_qemu.git/blobdiff - os-posix.c
Revert "vl: Fix to create migration object before block backends again"
[mirror_qemu.git] / os-posix.c
index 8f39447dd4fb7b0333804478720c51324c22935e..4bd80e44e6cd00aff3fc918b99bf4e8243e94c2e 100644 (file)
@@ -344,30 +344,6 @@ void os_set_line_buffering(void)
     setvbuf(stdout, NULL, _IOLBF, 0);
 }
 
-int qemu_create_pidfile(const char *filename)
-{
-    char buffer[128];
-    int len;
-    int fd;
-
-    fd = qemu_open(filename, O_RDWR | O_CREAT, 0600);
-    if (fd == -1) {
-        return -1;
-    }
-    if (lockf(fd, F_TLOCK, 0) == -1) {
-        close(fd);
-        return -1;
-    }
-    len = snprintf(buffer, sizeof(buffer), FMT_pid "\n", getpid());
-    if (write(fd, buffer, len) != len) {
-        close(fd);
-        return -1;
-    }
-
-    /* keep pidfile open & locked forever */
-    return 0;
-}
-
 bool is_daemonized(void)
 {
     return daemonize;