Perl: exec function with rename and Java

Discussion in 'Perl Misc' started by Andy K, May 27, 2004.

  1. Andy K

    Andy K Guest

    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
     
    Andy K, May 27, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hal Vaughan
    Replies:
    11
    Views:
    1,154
    Gordon Beaton
    May 22, 2006
  2. tedsuzman
    Replies:
    2
    Views:
    7,123
    Michel Claveau, résurectionné d'outre-bombe inform
    Jul 21, 2004
  3. Ted
    Replies:
    1
    Views:
    478
    Duncan Booth
    Jul 22, 2004
  4. Guillermo Riojas
    Replies:
    0
    Views:
    184
    Guillermo Riojas
    Nov 26, 2010
  5. Rhugga

    Perl Rename function unreliable?

    Rhugga, Jul 23, 2005, in forum: Perl Misc
    Replies:
    6
    Views:
    333
Loading...

Share This Page