#399076 time: Bad interaction with SIGSTOP/SIGCONT

Package:
bash
Source:
bash
Description:
GNU Bourne Again SHell
Submitter:
Gabor Melis
Date:
2015-10-26 16:39:13 UTC
Severity:
normal
Tags:
#399076#5
Date:
2006-11-17 14:36:29 UTC
From:
To:
When the process being timed gets a SIGSTOP time considers its job
finished. In the following transcript I pressed C-z about a second
after issuing the time command.

[~]$ time sleep 5

[1]+  Stopped                 sleep 5

real    0m0.944s
user    0m0.000s
sys     0m0.001s
[~]$ fg
sleep 5
[~]$

#399076#10
Date:
2007-03-12 13:54:30 UTC
From:
To:
This is a bug in the bash built-in version of time, not the "real" time
command (/usr/bin/time).

/usr/bin/time does not exhibit this behaviour.

#399076#17
Date:
2013-01-28 01:40:54 UTC
From:
To:
tags 399076 + confirmed
found 399076 4.2+dfsg-0.1
thanks

This persists with bash 4.2+dfsg-0.1.

#399076#22
Date:
2015-10-26 16:25:21 UTC
From:
To:
tags 399076 upstream

This is still not fixed and contained in upstream Bash as well.
I have reported it upstream.

KR