help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] `eval' subprocess not terminated


From: Matthew Cengia
Subject: Re: [Help-bash] `eval' subprocess not terminated
Date: Thu, 6 Feb 2014 15:07:05 +1100
User-agent: Mutt/1.5.21 (2010-09-15)

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

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]