OSDN Git Service
(root)
/
handbrake-jp
/
handbrake-jp-git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LinGui: add option to completely disable update checking
[handbrake-jp/handbrake-jp-git.git]
/
gtk
/
src
/
presets.c
diff --git
a/gtk/src/presets.c
b/gtk/src/presets.c
index
7d7e844
..
66f69a7
100644
(file)
--- a/
gtk/src/presets.c
+++ b/
gtk/src/presets.c
@@
-1211,7
+1211,6
@@
ghb_find_pid_file()
if (strncmp(file, "ghb.pid.", 8) == 0)
{
gchar *path;
if (strncmp(file, "ghb.pid.", 8) == 0)
{
gchar *path;
- int fd, lock = 1;
pid_t my_pid;
int pid;
pid_t my_pid;
int pid;
@@
-1222,9
+1221,12
@@
ghb_find_pid_file()
file = g_dir_read_name(gdir);
continue;
}
file = g_dir_read_name(gdir);
continue;
}
-
path = g_strdup_printf("%s/%s", config, file);
path = g_strdup_printf("%s/%s", config, file);
- fd = g_open(path, O_RDWR);
+
+#if !defined(_WIN32)
+ int fd, lock = 1;
+
+ fd = open(path, O_RDWR);
if (fd >= 0)
{
lock = lockf(fd, F_TLOCK, 0);
if (fd >= 0)
{
lock = lockf(fd, F_TLOCK, 0);
@@
-1240,6
+1242,13
@@
ghb_find_pid_file()
}
g_free(path);
close(fd);
}
g_free(path);
close(fd);
+#else
+ g_dir_close(gdir);
+ g_unlink(path);
+ g_free(path);
+ g_free(config);
+ return pid;
+#endif
}
file = g_dir_read_name(gdir);
}
}
file = g_dir_read_name(gdir);
}