Perl: exec function with rename and Java

A

Andy K

Hi

I am trying to use the Perl 'exec' function to execute a Java application
using a different process name, similar to...
exec {'/bin/sleep'} 'minute', 60;
When I grep for the process, I get 'minute 60' as expected.

However, when calling a Java application, the following call does not to
work:-
exec {'/opt/java/bin/../bin/PA_RISC2.0/native_threads/java'} 'newname',
myApp;
and I get a coredump.

although I am able to successfully use 'exec' without renaming the process
e.g.
exec('/opt/java/bin/../bin/PA_RISC2.0/native_threads/java myApp');

For clarification, am avoiding the call to the .java_wrapper in
java/bin...hence the call to the Java binary.
Am using Perl v5.6.1 on an HP-UX 11.11 box

Any ideas how I can call my Java app with 'exec' and successfully rename the
process ?

Thanks.

Andy

P.S.
Wasn't sure whether to post to a Perl of Java ng so thought I'd try here
first
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top