commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petteri Räty (JIRA) <j...@apache.org>
Subject [jira] Commented: (DAEMON-92) jsvc fails to execve() self on Linux
Date Sun, 11 Feb 2007 17:06:05 GMT

    [ https://issues.apache.org/jira/browse/DAEMON-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472114
] 

Petteri Räty commented on DAEMON-92:
------------------------------------

trunk already seems to be using /proc/self/exe so this can be closed or wait until the fix
is in a release version
       /* execve needs a full path */
        ret = readlink("/proc/self/exe",buf,sizeof(buf)-1);

betelgeuse@pena /mnt/checkouts/commons-daemon-trunk $ grep /proc/self/ -r .
./src/native/unix/.svn/text-base/CHANGES.txt.svn-base:  * fix 36030. (using /proc/self/exe
and readlink).
./src/native/unix/native/.svn/text-base/jsvc-unix.c.svn-base:        ret = readlink("/proc/self/exe",buf,sizeof(buf)-1);
./src/native/unix/native/jsvc-unix.c:        ret = readlink("/proc/self/exe",buf,sizeof(buf)-1);
./src/native/unix/CHANGES.txt:  * fix 36030. (using /proc/self/exe and readlink).



> jsvc fails to execve() self on Linux
> ------------------------------------
>
>                 Key: DAEMON-92
>                 URL: https://issues.apache.org/jira/browse/DAEMON-92
>             Project: Commons Daemon
>          Issue Type: Bug
>    Affects Versions: 1.0.1
>            Reporter: Simone Piunno
>         Attachments: 1.0.1-execve-self.patch
>
>
> On Linux jsvc execve() itself.
> execve() requires an absolute path as the first argument therefore use of argv[0] only
works when jsvc was invoked with a full path.
> Executing jsvc as relative path fails with "jsvc error: Cannot execute JSVC executor
process".
> On Linux the full path to self is very easy to find: "/proc/self/exe"
> I'm attaching a patch fixing this problem and falling back to argv[0] in case /proc is
not mounted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message