NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/57180: sh fails to foreground partially terminated pipeline job
>Number: 57180
>Category: bin
>Synopsis: sh fails to foreground partially terminated pipeline job
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 10 01:45:01 +0000 2023
>Originator: Taylor R Campbell
>Release: current
>Organization:
The NetBg Fgndation
>Environment:
bomb cyclone aftereffects
>Description:
I started a shell job for `foo | less', more or less, with a long-running foo that didn't produce any output for a while.
I hit ^Z and tried to bg the job so it would continue running, but the whole pipeline stopped on less(1) tty output.
I manually ran kill -CONT on the foo process and it continued on its merry way for several hours.
Once foo terminated, I tried to fg the job, but it refused with:
fg: Cannot continue job (No such process)
The job is still listed in jobs, with foo as `Done' and less as `Stopped (tty output)'. Using `fg %<jobnum>' fails the same way.
The full pipeline was a little more involved:
./binary16std | awk '{ x[$4]++ } END { for (i in x) print i, x[i] }' | sort -n | awk '{ print $1/(2**24), $2 }' | less
# jobs
[2] + Done ./binary16std |
Running awk "{ x[\$4]++ } END { for (i in x) print i, x[i] }" |
Stopped (tty output) sort -n |
Stopped (tty output) awk "{ print \$1/(2**24), \$2 }" |
Stopped (tty output) less
>How-To-Repeat:
Haven't tried to reproduce but the description above should provide enough information to make a reproducer and track down the bug.
>Fix:
Yes please!
Home |
Main Index |
Thread Index |
Old Index