Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11657
| Path | csiph.com!xmission!news.glorb.com!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Linda Walsh <bash@tlinx.org> |
| Newsgroups | gnu.bash.bug |
| Subject | Running procs in bg, +Ctl-C, then Ctl-C again after they complete + NL==? |
| Date | Wed, 14 Oct 2015 22:05:48 -0700 |
| Lines | 51 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.354.1444885635.7904.bug-bash@gnu.org> (permalink) |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | usenet.stanford.edu 1444885635 2281 208.118.235.17 (15 Oct 2015 05:07:15 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | bug-bash <bug-bash@gnu.org> |
| Envelope-to | bug-bash@gnu.org |
| User-Agent | Thunderbird |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] |
| X-Received-From | 173.164.175.65 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.14 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:11657 |
Show key headers only | View raw
Was just playing around seeing how the sigint
being ignored in children acted. wrote short
function: This behavior seems limited to testing
this as a foregnd function, not a shell script.
I.e, sourcing the function, then
execute the function:
> lnch
function lnch {
set -o monitor # fyi makes no difference if present
for((i=0;i++<3;)); do
declare -i l=1+i
(sleep $l ; echo "$l exiting")&
done
echo Waiting...
wait
echo wait finished with $?
}
====
If I let it finish, nothing interesting.
If I press control C after I see the "wait finished with 0", I get
another cmd prompt as normal, and pressing 'enter' does nothing special
If I press ^C after seeing "Waiting, ...",
but before "wait finished", then
I still see the "num exiting"... as previously mentioned
being normal behavior..., but then:
After the 3 sleepers exit, if I
either
press control-c again, then enter
or
enter, Ctl-c, enter
the shell will exit.
It seems the first control-c messes something up
such that entering another one after the children *really* finish
then enter (NL), exits the fg shell... Reproducible?
Normal behavior?
> echo ${BASH_VERSION[@]}
4.3.39(1)-release
Back to gnu.bash.bug | Previous | Next | Find similar
Running procs in bg, +Ctl-C, then Ctl-C again after they complete + NL==? Linda Walsh <bash@tlinx.org> - 2015-10-14 22:05 -0700
csiph-web