Author: mladen.turk(a)jboss.com
Date: 2007-10-06 04:39:16 -0400 (Sat, 06 Oct 2007)
New Revision: 1089
Modified:
trunk/sight/native/os/linux/process.c
Log:
Optimize the term0 code - separate declaration from implementation
Modified: trunk/sight/native/os/linux/process.c
===================================================================
--- trunk/sight/native/os/linux/process.c 2007-10-06 08:36:58 UTC (rev 1088)
+++ trunk/sight/native/os/linux/process.c 2007-10-06 08:39:16 UTC (rev 1089)
@@ -559,12 +559,11 @@
apr_status_t rv;
apr_exit_why_e why;
int status;
+#else
+ pid_t pg;
+#endif
- UNREFERENCED_STDARGS;
- /* Ensure pid sanity */
- if (pid < 1)
- return APR_EINVAL;
-
+#ifndef HAVE_GETPGID
proc.pid = pid;
rv = apr_proc_wait(&proc, &status, &why, APR_NOWAIT);
if (rv == APR_CHILD_DONE) {
@@ -575,13 +574,6 @@
return rv;
}
#else
- pid_t pg;
-
- UNREFERENCED_STDARGS;
- /* Ensure pid sanity */
- if (pid < 1)
- return APR_EINVAL;
-
pg = getpgid(pid);
if (pg == -1) {
/* Process already dead... */