문제

I'm using Cygwin to start some servers.

Each server is launched inside an xterm with a bunch of command like this one:
xterm -e $my_cmd /C &

Is there an easy way to kill all launched children (xterm and their running commands) in a row ?

I want also to be able kill a particular launched command when I close its parent xterm.

Someone knows how to perform that ?

도움이 되었습니까?

해결책

killall xterm? That command is in the psmisc package. Xterm will notify its child process with a SIGHUP ("hangup") before it exits. Normally that will cause the child process to exit too, although some servers interpret that signal differently.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top