Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15595

loadable sleep exits immediately

From p.debruijn@unilogic.nl
Newsgroups gnu.bash.bug
Subject loadable sleep exits immediately
Date 2019-11-12 15:15 +0100
Message-ID <mailman.1294.1573571239.13325.bug-bash@gnu.org> (permalink)
References <E1iUWx4-0001zD-S7@eggs.gnu.org>

Show all headers | View raw


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.

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

loadable sleep exits immediately p.debruijn@unilogic.nl - 2019-11-12 15:15 +0100

csiph-web