Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#18255 - [less] is stopped unexpectedly when SIGCHLD has handler in bash

Attached to Project: Arch Linux
Opened by Ted Pavlic (tpavlic) - Tuesday, 09 February 2010, 17:18 GMT
Last edited by Allan McRae (Allan) - Saturday, 20 March 2010, 02:35 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: When there is a bash handler for SIGCHLD, less is stopped when the process emptying into the pipe finishes. This problem does not occur on other UNIX systems.

Additional info:
* core/less 436-1

Steps to reproduce:

1. Put this simple script into .bashrc (e.g., for telling bash the proper window width after a resize so that commands always wrap correctly):

#####################################
sizetw 26 100
function updwin() {
NUMLINES=$(tput lines)
NUMCOLS=$(tput cols)
sizetw ${NUMLINES} ${NUMCOLS}
return 0
}
trap updwin SIGWINCH
trap updwin SIGCHLD
#####################################

2. Then, after starting a new bash shell that executes that script, try:

# cat /etc/services | less


3. less should pause on the first page. After a few seconds, hit the "down" cursor to move down in the file. bash should then report that the process was "Stopped" (which can be confirmed with the "jobs" command). The user then has to issue a "fg" to get the process back and quit the less.


I have verified that this problem does not occur on less 382 (on Darwin) or less 394 (RedHat Enterprise Linux Client 5.4/Tikanga). My system is an x86_64 Arch Linux. I plan to e-mail less's author as well.
This task depends upon

Closed by  Allan McRae (Allan)
Saturday, 20 March 2010, 02:35 GMT
Reason for closing:  Upstream
Additional comments about closing:  See final comment
Comment by Allan McRae (Allan) - Thursday, 18 February 2010, 01:26 GMT
Upstream does not have a real bug tracker, but the issue is logged:
http://www.greenwoodsoftware.com/less/bugs.html
Comment by Ted Pavlic (tpavlic) - Saturday, 20 February 2010, 22:39 GMT
Discussed the issue with less's author over e-mail. Evidently, it does not occur on all systems, and it occurs with older versions of less as well. The problem (which likely can be fixed within less) seems to be a combination of less and other elements of Arch Linux (kernel, shell, etc.).
Comment by Allan McRae (Allan) - Saturday, 20 March 2010, 02:35 GMT
Closing this as an upstream issue. Reopen if a patch is made available before the release that fixes it.

Loading...