I think this is more of a *nix question but I wanted to ask here since it's related to the JLine signal handlers and likely something that's been run into before. This came up a few days back in another thread and I asked about it but the question looks to have gotten lost in the other conversation so I'm breaking it out as its own thread.
My console app starts up background servers with ProcessBuilder on a user's PC. The process builder is not held open. I actually fire off an intermediate process which actually spins up the server and then exits. Nonetheless, even though the original Java CLI process that JLIne is running in no longer has any direct ties to this background server, it was mentioned that the operating system still groups those processes together.
The regression, which did not happen in Jline2, is that hitting Ctrl-C in the shell will kill off any background servers the user had started, even if they were started hours before. I'm catching the thread interrupt in my code and handling it (by cancelling the currently-executing command, or if the user is setting at the shell, doing nothing and telling them to use Ctrl-D to exit the shell). Point is, the Ctrl-C is not killing the Jline process, but all previously spawned external processes do get killed off which I don't want.
Looking around on the interwebs, I'm seeing references to using nohup
So just want to confirm, is this the only way out for me? Am I missing some sort of configuration that would affect this behavior?
Thanks!
~Brad
Developer Advocate
Ortus Solutions, Corp