bug-bash
[Top][All Lists]
Advanced

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

Re: time builtin handles backgrounding poorly


From: Chet Ramey
Subject: Re: time builtin handles backgrounding poorly
Date: Thu, 13 Sep 2007 22:21:26 -0400
User-agent: Thunderbird 2.0.0.6 (Macintosh/20070728)

Jack Lloyd wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: linux-gnu
> Compiler: x86_64-redhat-linux-gcc
> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' 
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu' 
> -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' 
> -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib  -D_GNU_SOURCE  -O2 -g 
> -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
> --param=ssp-buffer-size=4 -m64 -mtune=generic
> uname output: Linux wks9 2.6.15-1.2054_FC5 #1 SMP Tue Mar 14 15:48:20 EST 
> 2006 x86_64 x86_64 x86_64 GNU/Linux
> Machine Type: x86_64-redhat-linux-gnu
> 
> Bash Version: 3.1
> Patch Level: 7
> Release Status: release
> 
> Description:
> 
>         The time builtin seems to be confused if something is
>         backgrounded, and prints immediately the time rather than
>         waiting for the job to complete. I found this very unexpected.

`time' is not a builtin; it is a shell reserved word that causes timing
information to be printed when `waitpid' returns.  It's a synchronous
operation that doesn't interact as you'd like with job control.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/




reply via email to

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