Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: p.debruijn@unilogic.nl Newsgroups: gnu.bash.bug Subject: loadable sleep exits immediately Date: Tue, 12 Nov 2019 15:15:23 +0100 Lines: 41 Approved: bug-bash@gnu.org Message-ID: References: NNTP-Posting-Host: lists.gnu.org X-Trace: usenet.stanford.edu 1573571239 14805 209.51.188.17 (12 Nov 2019 15:07:19 GMT) X-Complaints-To: action@cs.stanford.edu To: bug-bash@gnu.org Envelope-to: bug-bash@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4128:6135:11:123::25 X-Mailman-Approved-At: Tue, 12 Nov 2019 10:07:18 -0500 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: Xref: csiph.com gnu.bash.bug:15595 Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: /opt/project/buildroot/output/host/bin/x86_64-buildroot-linux-gnu-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-buildroot-linux-gnu' -DCONF_VENDOR='buildroot' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -D_FORTIFY_SOURCE=1 -Wno-parentheses -Wno-format-security uname output: Linux netbootbox 4.14.153 #6 SMP Tue Nov 12 14:20:37 CET 2019 x86_64 GNU/Linux Machine Type: x86_64-buildroot-linux-gnu Bash Version: 4.4 Patch Level: 23 Release Status: release Description: The loadable sleep function seems to exit almost immediately in some specific cases. Repeat-By: The following minimal reproducable example illustrates the issue: #!/bin/bash enable -f /lib/bash/sleep sleep aaa () { type sleep while true; do echo -n "A" dmesg >/dev/null & sleep $1 done } while true; do aaa 5 & sleep 60 done Workaround: Use /bin/sleep However this is unwatend for long running scripts, where it pollutes the process list.