On 2014-02-06 01:00, Ion Savin wrote:
> Hi,
>
> I'm launching a script which is using `eval' to start a long running
> process (just as an example I'll use xeyes):
>
> $ cat test.sh
> #!/bin/bash
> eval xeyes
>
> $ ./test.sh
>
> From another terminal I kill the shell process:
>
> $ kill -9 `ps h --format pid -C "test.sh"`
>
> The shell process terminates but the child process is not killed. Is
> there any way to force bash (I'm using ver. 4.2.45) to terminate the
> `eval' subprocesses it has created?
Why do you need eval at all? Are you sure you don't mean to be using
exec?
<greybot> 'eval' is a common misspelling of 'evil'. If eval is the
answer, surely you are asking the wrong question. See
http://mywiki.wooledge.org/BashFAQ/048
--
Regards,
Matthew Cengia