Results 1 to 2 of 2
  1. #1
    rgupta12 is offline Member
    Join Date
    Jan 2016
    Posts
    5
    Rep Power
    0

    Default Runtime.getRuntime().exec( .....

    Any idea, this works on linux from terminal (it pauses a process)

    kill -STOP + 227222

    This does not work from JAVA code though? (the PID is correct)

    Runtime.getRuntime().exec("kill -STOP + PID).waitFor();

    However,

    Runtime.getRuntime().exec("kill + PID).waitFor() DOES work (kills the process)

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,423
    Blog Entries
    7
    Rep Power
    27

    Default Re: Runtime.getRuntime().exec( .....

    Don't double post: http://www.java-forums.org/new-java/...d-waitfor.html
    I'm closing this thread.

    kind regards,

    Jos
    Build a wall around Donald Trump; I'll pay for it.

Similar Threads

  1. Is there an alternative to Runtime.getRuntime().exec()
    By md_suzon in forum Advanced Java
    Replies: 5
    Last Post: 04-24-2013, 02:17 PM
  2. Runtime.getRuntime().exec() and pppd
    By mysticav in forum Networking
    Replies: 7
    Last Post: 02-15-2011, 07:44 PM
  3. Slow Output reading with Runtime.getRuntime().exec()
    By gmcouto in forum Advanced Java
    Replies: 8
    Last Post: 05-14-2010, 10:42 AM
  4. help with Runtime.getRuntime().exec
    By collin389 in forum AWT / Swing
    Replies: 3
    Last Post: 11-09-2009, 04:22 AM
  5. grep on multiple files using Runtime.getRuntime().exec()
    By cprash.aggarwal in forum Advanced Java
    Replies: 3
    Last Post: 02-11-2009, 06:55 AM

Posting Permissions

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