Reflections & Reference Objects - null
Hi all,
I'm starting a C-Program using
Process p =new ProcessBuilder("./theCProgram").start();
from within my Java application and I need to send a (POSIX) signal (likeSIGUSR1) to that process. I think there are different possibilities to do that:
1. Hope that one of you guys knows a neat way to send a signal to the process using the Java API.
2. Write my own Process class using JNI.
3. Try to get the Unix process ID (as it has been suggested here in this forum) and then start another process from the Java app that useskill to send the signal to the PID.
I've looked through the API docs a lot so I doubt there is a nice way to send a signal, but of cause I'd be glad to hear the opposite.
Possibility no 2 seems to be the cleaner approach to me compared to no 3, since it doesn't rely on a specific shell (no 3 does, since kill is a shell build-in). What do you guys think?
Note: Since the C-Program only runs on Unix/Linux, it's okay for the Java program to have the same limitations (i.e. it only needs to run on Unix/Linux as well).
Thanks for sharing your expertise,
Florence

