Author: mladen.turk(a)jboss.com
Date: 2007-10-06 04:36:02 -0400 (Sat, 06 Oct 2007)
New Revision: 1087
Modified:
trunk/sight/native/os/linux/process.c
Log:
Optimize the term0 code
Modified: trunk/sight/native/os/linux/process.c
===================================================================
--- trunk/sight/native/os/linux/process.c 2007-10-06 08:32:13 UTC (rev 1086)
+++ trunk/sight/native/os/linux/process.c 2007-10-06 08:36:02 UTC (rev 1087)
@@ -554,16 +554,18 @@
SIGHT_EXPORT_DECLARE(jint, Process, term0)(SIGHT_STDARGS, jint pid,
jint signum)
{
+ UNREFERENCED_STDARGS;
+
+ /* Ensure pid sanity */
+ if (pid < 1)
+ return APR_EINVAL;
+
#ifndef HAVE_GETPGID
apr_proc_t proc;
apr_status_t rv;
apr_exit_why_e why;
int status;
- /* Ensure pid sanity */
- if (pid < 1) {
- return APR_EINVAL;
- }
proc.pid = pid;
rv = apr_proc_wait(&proc, &status, &why, APR_NOWAIT);
@@ -577,11 +579,6 @@
#else
pid_t pg;
- /* Ensure pid sanity. */
- if (pid < 1) {
- return APR_EINVAL;
- }
-
pg = getpgid(pid);
if (pg == -1) {
/* Process already dead... */