Win32 build fix. FIXME: This disables locking of the pidfile, a

Win32 replacement of lockf should be used here.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2524 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
ths 2007-03-22 12:36:53 +00:00
parent 9bad0425a0
commit 6e65a42ad3

3
vl.c
View File

@ -4405,8 +4405,11 @@ static int create_pidfile(const char *filename)
if (fd == -1) if (fd == -1)
return -1; return -1;
/* XXX: No locking for Win32 implemented */
#ifndef _WIN32
if (lockf(fd, F_TLOCK, 0) == -1) if (lockf(fd, F_TLOCK, 0) == -1)
return -1; return -1;
#endif
len = snprintf(buffer, sizeof(buffer), "%ld\n", (long)getpid()); len = snprintf(buffer, sizeof(buffer), "%ld\n", (long)getpid());
if (write(fd, buffer, len) != len) if (write(fd, buffer, len) != len)