Results 1 to 3 of 3
  1. #1
    fxRichard is offline Member
    Join Date
    Dec 2008
    Posts
    64
    Rep Power
    0

    Default Java subprocesses via Runtime.exec() and windows "end process tree"...

    ...is there any way to spawn a process in java whether it be internal to java or some workaround that does not tie the original java app to the subprocess? For instance assume the following:

    Process1 runs Process2

    If someone performs an "end process" in windows task manager on Process1 then Process2 still stays alive however if someone performs an "end process tree" on Process1 then both Process1 and Process2 are killed because Process2 was started by Process1. Is there any way to run Process2 from Process1 without associating the two in a process tree so performing an "end process tree" on Process1 does not kill Process2?

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    In unix you would use the "nohup" command. Try googling for something like "windows equivalent to nohup".

  3. #3
    logicbug's Avatar
    logicbug is offline Member
    Join Date
    Jan 2009
    Location
    The Great White North, eh?
    Posts
    76
    Rep Power
    0

    Default

    You need to fork your subprocess. See bugs.sun.com/bugdatabase/view_bug.do?bug_id=4420885

Similar Threads

  1. Java, Military Format using "/" and "%" Operator!!
    By sk8rsam77 in forum New To Java
    Replies: 11
    Last Post: 02-26-2010, 03:03 AM
  2. Replies: 6
    Last Post: 12-29-2008, 02:47 PM
  3. Replies: 1
    Last Post: 10-20-2008, 07:35 AM
  4. runtime.exec stale process
    By karine in forum Advanced Java
    Replies: 6
    Last Post: 10-06-2008, 05:40 PM
  5. Replies: 0
    Last Post: 09-18-2008, 05:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •