gegl r2722 - in trunk: . gegl
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2722 - in trunk: . gegl
- Date: Mon, 10 Nov 2008 21:42:28 +0000 (UTC)
Author: ok
Date: Mon Nov 10 21:42:28 2008
New Revision: 2722
URL: http://svn.gnome.org/viewvc/gegl?rev=2722&view=rev
Log:
* gegl/gegl-init.c: (pid_is_running): replace test for dir in /proc
with posix compliant (kill (pid, 0) == 0).
Modified:
trunk/ChangeLog
trunk/gegl/gegl-init.c
Modified: trunk/gegl/gegl-init.c
==============================================================================
--- trunk/gegl/gegl-init.c (original)
+++ trunk/gegl/gegl-init.c Mon Nov 10 21:42:28 2008
@@ -33,6 +33,25 @@
#include <process.h>
#endif
+#ifdef G_OS_WIN32
+
+ /*I guess what is below doesn't work on win32 ...
+ or does it overlap with posix here somehow?*/
+ eeeeeek();
+
+#else
+
+#include <sys/types.h>
+#include <signal.h>
+
+static inline gboolean
+pid_is_running (gint pid)
+{
+ return (kill (pid, 0) == 0);
+}
+#endif
+
+
#include <gegl-debug.h>
@@ -253,14 +272,6 @@
#endif
void gegl_tile_backend_file_stats (void);
-static gboolean
-pid_is_running (gint pid)
-{
- gchar buf[512];
- g_snprintf (buf, sizeof (buf), "/proc/%i", pid);
- return g_file_test (buf, G_FILE_TEST_EXISTS);
-}
-
static void swap_clean (void)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]