[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
My script makes a defunct subshell and sticks on read
From: |
Øyvind Hvidsten |
Subject: |
My script makes a defunct subshell and sticks on read |
Date: |
Tue, 30 Jan 2018 21:04:48 +0100 |
User-agent: |
Cathedral Secure Mail v0.8 |
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
-DSHELL -DHAVE_CONFIG_H -I. -I../. -I.././include -I.././lib
-Wdate-time -D_FORTIFY_SOURCE=2 -g -O2
-fdebug-prefix-map=/build/bash-7fckc0/bash-4.4=.
-fstack-protector-strong -Wformat -Werror=format-security -Wall -no-pie
-Wno-parentheses -Wno-format-security
uname output: Linux vampiric 4.9.0-4-amd64 #1 SMP Debian 4.9.51-1
(2017-09-28) x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu
Bash Version: 4.4
Patch Level: 12
Release Status: release
Description:
Running the included script, which does nothing useful but is cut
down a lot to demonstrate the issue, my main computer (amd64 based)
counts to several million, then Bash stops responding, using 100% cpu
and ends up with a defunct subshell. On my Raspberry Pi, running
Raspbian Stretch and the same version of Bash (4.4.12), the same thing
happens after only a few thousand iterations.
Repeat-By:
for ((i=0; ; i++)); do ((i%100)) || echo $i; exec {fd}<> >(:); read
-t 0.001 -u $fd; exec {fd}>&-; done
- My script makes a defunct subshell and sticks on read,
Øyvind Hvidsten <=