Searched hist:"29 da75477bd86b4efa5afb5fe9c131ad86099bf7" (Results 1 – 2 of 2) sorted by relevance
/freebsd/usr.bin/script/ |
H A D | script.1 | diff 29da75477bd86b4efa5afb5fe9c131ad86099bf7 Tue Sep 27 20:14:04 CEST 2011 Mikolaj Golub <trociny@FreeBSD.org> When script(1) reads EOF from input it starts spinning on zero-byte reads eating 100% CPU. Fix this by skipping select on STDIN after reading EOF -- permanently if STDIN is not terminal and for one second if it is.
Also after reading EOF from STDIN we have to pass it to the program being scripted. The previous approach was to write zero bytes into the pseudo-terminal. This does not work because zero-byte write does not have any effect on read. Fix this by sending VEOF instead.
Submitted by: Ronald Klop <ronald-freebsd8@klop.yi.org> Discussed with: kib, Chris Torek <chris.torek@gmail.com> Approved by: kib MFC after: 1 week
|
H A D | script.c | diff 29da75477bd86b4efa5afb5fe9c131ad86099bf7 Tue Sep 27 20:14:04 CEST 2011 Mikolaj Golub <trociny@FreeBSD.org> When script(1) reads EOF from input it starts spinning on zero-byte reads eating 100% CPU. Fix this by skipping select on STDIN after reading EOF -- permanently if STDIN is not terminal and for one second if it is.
Also after reading EOF from STDIN we have to pass it to the program being scripted. The previous approach was to write zero bytes into the pseudo-terminal. This does not work because zero-byte write does not have any effect on read. Fix this by sending VEOF instead.
Submitted by: Ronald Klop <ronald-freebsd8@klop.yi.org> Discussed with: kib, Chris Torek <chris.torek@gmail.com> Approved by: kib MFC after: 1 week
|