0

I'm making a Java app which requires me to be able to pause (and resume) a child process ran with ProcessBuilder. I thought I could do it by sending the signals SIGSTOP and SIGCONT to the process, I googled it but I couldn't find anything regarding this.

How can I send a signal to a child process?

Fr3ddyDev
  • 436
  • 6
  • 13

1 Answers1

1

I don't know why you are opposed to kill, it is fairly straightforward.

int child_pid = 12345;
Runtime.getRuntime().exec("kill -SIGSTOP " + Integer.toString(child_pid));
Zachary Oldham
  • 838
  • 1
  • 5
  • 21