bug-bash
[Top][All Lists]
Advanced

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

Re: In a script, when you kill a process, you get a terminal style messa


From: Chet Ramey
Subject: Re: In a script, when you kill a process, you get a terminal style message...
Date: Mon, 22 Jan 2018 09:59:14 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 1/22/18 9:51 AM, Greg Wooledge wrote:
> On Sun, Jan 21, 2018 at 10:23:52AM -0700, gazelle@xmission.com wrote:
>> 1) In a script, when you kill a process, you get a terminal style message
>> about the process being killed.  See below for further description.
> 
> Here's a simpler reproducer (no need for external symlinks or killall):
> 
> wooledg:~$ cat foo
> #!/bin/bash
> sleep 100 & pid=$!
> kill $pid
> wait
> wooledg:~$ ./foo
> ./foo: line 4:  8615 Terminated              sleep 100
> 
> And I have to agree, a clean way to turn off job control type messages
> is something MANY people would love to have.

There are build-time options to disable reporting for SIGPIPE (which is
enabled in bash-4.4, so exits due to SIGPIPE aren't reported) and
SIGTERM (which is not). There isn't a runtime option to control it. I
will probably enable the option that doesn't report exits due to
SIGTERM in bash-5.0.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

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