pkgsrc-wip/endeavour/patches/patch-af
2006-08-03 22:06:30 +00:00

21 lines
586 B
Text

$NetBSD: patch-af,v 1.2 2006/08/03 22:06:30 dhowland Exp $
--- endeavour2/edv_utils.c.orig 2006-07-01 20:44:00.000000000 -0400
+++ endeavour2/edv_utils.c
@@ -697,6 +697,16 @@ gboolean EDVProcessIsRunning(gint pid)
gchar path[PATH_MAX + NAME_MAX];
g_snprintf(path, sizeof(path), "/proc/%i", pid);
return(access(path, F_OK) ? FALSE : TRUE);
+#elif defined(__NetBSD__)
+/* sched_getparam doesnt seem to work on NetBSD */
+ if(pid <= 0)
+ return(FALSE);
+
+ if(kill(pid,0) == 0) {
+ return(TRUE);
+ } else {
+ return(FALSE);
+ }
#else
struct sched_param sp;