Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 4606 invoked from network); 15 Aug 2005 17:44:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Aug 2005 17:44:23 -0000 Received: (qmail 32917 invoked by uid 500); 15 Aug 2005 17:44:08 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 32813 invoked by uid 500); 15 Aug 2005 17:44:08 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 32756 invoked by uid 500); 15 Aug 2005 17:44:07 -0000 Received: (qmail 32731 invoked by uid 99); 15 Aug 2005 17:44:07 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 15 Aug 2005 10:44:07 -0700 Received: (qmail 4437 invoked by uid 65534); 15 Aug 2005 17:44:07 -0000 Message-ID: <20050815174407.4436.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r232839 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Date: Mon, 15 Aug 2005 17:44:06 -0000 To: commons-cvs@jakarta.apache.org From: jfclere@apache.org X-Mailer: svnmailer-1.0.3 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: jfclere Date: Mon Aug 15 10:44:02 2005 New Revision: 232839 URL: http://svn.apache.org/viewcvs?rev=232839&view=rev Log: fix 36030. Note that it requires /proc to be mounted. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=232839&r1=232838&r2=232839&view=diff ============================================================================== --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Mon Aug 15 10:44:02 2005 @@ -631,8 +631,9 @@ if (strcmp(argv[0],args->procname)!=0) { char *oldpath=getenv("LD_LIBRARY_PATH"); char *libf=java_library(args,data); - char *old=argv[0]; + char *filename; char buf[2048]; + int ret; char *tmp=NULL; char *p1=NULL; char *p2=NULL; @@ -653,9 +654,18 @@ log_debug("Invoking w/ LD_LIBRARY_PATH=%s",getenv("LD_LIBRARY_PATH")); + /* execve needs a full path */ + ret = readlink("/proc/self/exe",buf,sizeof(buf)-1); + if (ret<=0) + strcpy(buf,argv[0]); + else + buf[ret]='\0'; + + filename=buf; + argv[0]=args->procname; - execve(old,argv,environ); - log_error("Cannot execute JSVC executor process"); + execve(filename,argv,environ); + log_error("Cannot execute JSVC executor process (%s)",filename); return(1); } log_debug("Running w/ LD_LIBRARY_PATH=%s",getenv("LD_LIBRARY_PATH")); --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org