freebsd-nq/usr.bin
Konstantin Belousov c0ba4c2ee2 script(1): work around slow reading child
If child is slow reading from its input, or even completely stops doing
the read, script(1) hangs in write(2) to the pts master waiting until
there is a space in the terminal discipline buffer.  This also stops
handling any outer io, as well as child output.

Work around the problem by making pts master fd non-blocking, and be
prepared for short writes to it.  The data to be written to master is
buffered in the tailq which is processed when select(2) detects that
master is ready for write.

PR:	260938
Reported by:	наб <nabijaczleweli@nabijaczleweli.xyz>
See also:	https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1003095
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33789
2022-01-10 17:34:51 +02:00
..
addr2line
alias
apply
ar ar: accept but ignore 'T' option 2022-01-03 11:42:59 -05:00
asa
at at(1): Markup environment variables with proper macros 2020-07-19 14:42:13 +00:00
atm
awk awk: Move to using two sets of tests 2021-11-05 08:53:36 -06:00
backlight Improve the wording for showing the brightness level 2021-03-12 09:45:14 -07:00
banner banner: Correct history. 2021-06-21 08:40:54 -06:00
basename basename: fix history 2021-06-21 08:40:54 -06:00
bc
beep beep(1): Initial version of utility to create terminal beep via soundcard. 2021-11-04 09:00:46 +01:00
biff
bluetooth
bmake After-import bmake-20211212 2021-12-18 10:14:39 -08:00
brandelf Update Makefile.depend files 2019-12-11 17:37:53 +00:00
bsdcat bsdcat,cpio,tar: derive version string from archive.h 2020-12-29 14:21:50 -08:00
bsddialog bsddialog: import version 0.0.2 2021-12-21 16:13:00 +01:00
bsdiff bsdiff: fix off-by-one error 2020-11-16 18:41:49 +00:00
bzip2
bzip2recover
c89
c99
caesar
calendar Complete steps 5 and 9 for new committers (driesm) 2021-11-08 17:19:57 +01:00
cap_mkdb
chat Fix a few mandoc issues 2020-10-09 14:03:45 +00:00
chkey Update Makefile.depend files 2019-12-11 17:37:53 +00:00
chpass usr.bin/chpass: Correct manpage regarding path to temp files 2021-05-25 16:23:20 +01:00
cksum
clang Merge llvm-project 13.0.0 release 2021-11-13 21:49:29 +01:00
cmp cmp: initialize limit to avoid stack garbage limits 2021-10-21 11:30:55 -05:00
col col(1): Add EXAMPLES section 2020-10-21 16:30:34 +00:00
colrm colrm.1: Add a missing colon 2020-06-23 10:27:41 +00:00
column
comm comm(1): Add EXAMPLES section 2020-07-27 16:51:23 +00:00
compile_et pkgbase: Create a FreeBSD-kerberos package 2021-09-07 10:23:14 +02:00
compress compress(1): warn about link handling 2021-03-04 14:52:12 +01:00
cpio bsdcat,cpio,tar: derive version string from archive.h 2020-12-29 14:21:50 -08:00
cpuset sys/bitset.h: reduce visibility of BIT_* macros 2021-12-05 23:00:25 +01:00
csplit
ctags
ctlstat
cut
cxxfilt
dc
diff diff: consider two files with same inodes as identical 2021-10-07 17:07:00 +02:00
diff3 diff3: document and test -T 2021-08-25 18:20:59 +02:00
dirname
dpv dpv.1: Do not use mdoc macros for Bl width 2021-11-02 08:30:11 +01:00
drill Rename NO_WERROR -> MK_WERROR=no 2021-01-07 09:31:03 +00:00
dtc dtc: remove unknown option printf, since getopt will print it 2020-02-20 21:29:59 +00:00
du du_test: Skip three tests if sparse files are not supported 2021-02-03 17:06:07 +00:00
ee ncurses: chase dependency changes in the source tree 2021-10-04 11:38:24 +02:00
elfctl elfctl: avoid touching file if no change made 2021-05-26 10:12:12 -04:00
elfdump
enigma
env pkgbase: Put more binaries/lib in runtime 2021-12-21 10:17:27 +01:00
etdump
expand
factor Fix the way 'factor' behaves when using OpenSSL to match the description 2020-01-12 20:25:11 +00:00
false
fetch pkgbase: Create a FreeBSD-fetch package 2021-12-21 10:17:46 +01:00
file
file2c
find pkgbase: Put more binaries/lib in runtime 2021-12-21 10:17:27 +01:00
finger
fmt Fix some common typos in comments 2021-03-13 18:26:15 +01:00
fold fold(1): Add EXAMPLES section 2020-10-29 18:39:04 +00:00
fortune freebsd-tips: Fix the description of fetch(1) to match the command 2021-07-05 10:14:25 +08:00
from
fstat fuser: restore functionality by fixing fsid type 2021-11-01 08:45:26 +02:00
fsync pkgbase: Put a lot of binaries and lib in FreeBSD-runtime 2019-09-05 14:13:08 +00:00
ftp pkgbase: Create a FreeBSD-ftp package 2021-09-07 10:25:23 +02:00
gcore elf(3): Fix a typo in a sysctl description 2021-11-30 10:38:34 +01:00
gencat
getaddrinfo
getconf Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
getent getent(1): Add EXAMPLES section 2020-10-24 16:40:34 +00:00
getopt
gh-bc Skip -flto for all MIPS ports 2021-11-16 16:23:02 -07:00
gprof gprof: Retire a.out support 2020-12-26 11:47:47 -05:00
grdc ncurses: chase dependency changes in the source tree 2021-10-04 11:38:24 +02:00
grep pkgbase: Put more binaries/lib in runtime 2021-12-21 10:17:27 +01:00
gzip fts_read: Handle error from a NULL return better. 2020-12-08 23:38:26 +00:00
head Update Makefile.depend files 2019-12-11 17:37:53 +00:00
hesinfo
hexdump hexdump: Flush stdout after '*' (repeat) lines. 2021-07-29 06:40:57 +00:00
host
iconv iconv(1): Add EXAMPLE 2020-11-29 18:22:14 +00:00
id pkgbase: Put more binaries/lib in runtime 2021-12-21 10:17:27 +01:00
ident ident: replace sbuf(9) with open_memstream(3) 2021-10-28 15:51:23 +02:00
indent Fix a few typos in source code comments 2021-08-14 10:08:49 +02:00
ipcrm
ipcs
iscsictl Retire obsolete iscsi_initiator(4) 2021-10-26 16:17:35 -04:00
join join(1): Add EXAMPLES section 2020-06-20 11:27:59 +00:00
jot jot.1: Explain default argument values more precisely 2019-09-21 15:01:11 +00:00
kdump struct kevent_freebsd11 -> struct freebsd11_kevent 2021-11-15 18:34:27 +00:00
keylogin
keylogout
killall killall(1): Clarify -d, -s and -v options 2020-06-27 11:28:11 +00:00
ktrace
ktrdump ktrdump: properly parse %% in the format string 2021-12-29 23:08:15 -08:00
kyua Simplify and speed up the kyua build 2021-07-02 09:21:05 +01:00
lam
last last: improve non-UTF8 locale output after libxo support was added 2021-10-11 19:02:12 +02:00
lastcomm lastcomm/sa: Remove sparc64 tests, they aren't needed. 2021-10-04 10:51:15 -06:00
ldd ldd: also use exec mode for -a 2021-11-15 22:49:33 +02:00
ldd32 libcompat: Correct rtld MLINKS 2019-11-12 22:31:59 +00:00
leave Add extremely useful calendar(1) application to FreeBSD 2020-03-03 00:20:08 +00:00
less ncurses: chase dependency changes in the source tree 2021-10-04 11:38:24 +02:00
lessecho
lesskey less: upgrade to v590. 2021-07-17 22:20:44 -07:00
lex usr.bin/lex: regenerate bootstrap files after d37f81e35b 2021-04-21 10:56:29 +01:00
limits pkgbase: Put more binaries/lib in runtime 2021-12-21 10:17:27 +01:00
locale locale: exit 1 if unknown keyword was specified 2020-06-13 08:37:24 +00:00
localedef localedef: Fix bootstrapping on Ubuntu 16.04 2021-02-10 16:41:35 +00:00
locate Fix a grammar error on locate(1). 2020-12-11 08:04:54 +00:00
lock lock(1): Add EXAMPLES section 2020-12-11 19:27:21 +00:00
lockf Remove whitespace which accidentaly snuck into r364831. 2020-08-26 19:28:30 +00:00
logger pkgbase: Put more binaries/lib in runtime 2021-12-21 10:17:27 +01:00
login pkgbase: Put more binaries/lib in runtime 2021-12-21 10:17:27 +01:00
logins
logname
look look(1): Add EXAMPLES section 2020-12-29 21:48:12 +01:00
lorder lorder: add note that it is no longer required 2021-12-20 12:59:01 -05:00
lsvfs lsvfs(1): Add EXAMPLES section 2020-12-29 21:35:24 +01:00
lzmainfo
m4 m4(1): Add a SEE ALSO section and reference an AT&T manual 2021-04-08 21:16:54 +02:00
mail Replace literal uses of /usr/local in C sources with _PATH_LOCALBASE 2020-10-27 11:29:11 +00:00
man man: reset OPTIND before parsing args 2021-09-23 14:13:34 -05:00
mandoc mandoc: import version 1.14.6 2021-11-15 16:58:58 +01:00
mesg
minigzip
ministat Add a -q flag to ministat to suppress headers in output, for use with -n. 2021-12-18 22:53:03 +00:00
mkcsmapper Remove mkcsmapper_static and mkesdb_static from build-tools 2021-08-02 14:33:25 +01:00
mkcsmapper_static Remove mkcsmapper_static and mkesdb_static from build-tools 2021-08-02 14:33:25 +01:00
mkdep
mkesdb Remove mkcsmapper_static and mkesdb_static from build-tools 2021-08-02 14:33:25 +01:00
mkesdb_static Remove mkcsmapper_static and mkesdb_static from build-tools 2021-08-02 14:33:25 +01:00
mkfifo
mkimg mkimg: zero entry in vhdx_write_metadata 2021-11-20 19:37:25 -05:00
mkstr
mktemp pkgbase: Put more binaries/lib in runtime 2021-12-21 10:17:27 +01:00
mkuzip
morse
msgs ncurses: chase dependency changes in the source tree 2021-10-04 11:38:24 +02:00
mt Add the LTO-9 density code to libmt and the mt(1) man page. 2020-12-10 21:06:06 +00:00
nc Add -M option to nc(1), which makes it print the TCP connection 2019-12-14 10:53:52 +00:00
ncal ncurses: chase dependency changes in the source tree 2021-10-04 11:38:24 +02:00
ncurses ncurses: chase dependency changes in the source tree 2021-10-04 11:38:24 +02:00
netstat netstat: fix nhop prepend printing. 2021-12-26 15:05:10 +00:00
newgrp
newkey
nfsstat nfsstat: Add output for counts of new RPCs to the "-E" option 2021-11-14 13:36:14 -08:00
nice
nl nl(1): Add EXAMPLES section 2020-06-18 08:26:26 +00:00
nm Update Makefile.depend files 2019-12-11 17:37:53 +00:00
nohup
number
objcopy
ofed pkgbase: Create a FreeBSD-rdma package 2021-09-07 10:22:16 +02:00
opieinfo
opiekey
opiepasswd
pagesize
pamtest
passwd pkgbase: Put a lot of binaries and lib in FreeBSD-runtime 2019-09-05 14:13:08 +00:00
paste Fix confusing example in paste(1) 2021-05-31 16:12:44 -06:00
patch patch: cleanup variable initialization a bit. 2021-07-22 14:23:22 -05:00
pathchk
perror
pom
posixshmcontrol Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
pr
primes Fix the way 'factor' behaves when using OpenSSL to match the description 2020-01-12 20:25:11 +00:00
printenv
printf printf(1): Add EXAMPLES section 2020-07-01 16:33:32 +00:00
proccontrol proccontrol(1): Add wxmap control 2021-09-17 15:42:07 +03:00
procstat Pass vdso address to userspace 2021-12-06 20:46:49 +02:00
protect Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
quota Fix some common typos in comments 2021-08-08 10:16:06 +02:00
random random(6): Re-add undocumented support for floating point denominators 2020-02-15 19:13:37 +00:00
rctl Drop "All rights reserved" from all my stuff. This includes 2020-10-28 13:46:11 +00:00
readelf readelf: Add -z decompression support 2020-10-31 15:27:45 +00:00
renice renice(8): Clarify "who" parameters. 2020-10-27 12:32:17 +00:00
resizewin
rev rev(1): Add EXAMPLES section 2020-06-27 11:19:18 +00:00
revoke
rpcgen rpcgen: make compiler arglist allocation dynamic 2019-10-15 16:05:17 +00:00
rpcinfo
rs
rup
ruptime Remove extra spaces for the load average of machines that are down. 2020-04-04 12:07:36 +00:00
rusers
rwall
rwho
script script(1): work around slow reading child 2022-01-10 17:34:51 +02:00
sdiff
sdiotool
sed sed(1): Add a reference for a 4.4BSD manual document 2021-04-08 21:07:31 +02:00
seq seq(1): complete EXAMPLES section 2020-06-20 11:24:29 +00:00
shar
showmount [showmount] implement long options 2019-12-12 05:11:53 +00:00
size Update Makefile.depend files 2019-12-11 17:37:53 +00:00
smbutil
sockstat sockstat(1): Update Synopsis section 2021-11-10 15:22:06 -05:00
soelim
sort sort: Fix random sort 2021-10-29 14:29:50 -04:00
split split(1): Add EXAMPLES section 2020-06-18 15:14:10 +00:00
ssh-copy-id
stat usr.bin/stat: honour locale for "-t %+" 2021-10-30 09:00:34 +02:00
stdbuf
strings Update Makefile.depend files 2019-12-11 17:37:53 +00:00
su Do not use macros in -width 2020-03-26 17:58:52 +00:00
systat systat -vm: Humanize output for ease of reading. 2022-01-01 19:48:06 -08:00
tabs ncurses: chase dependency changes in the source tree 2021-10-04 11:38:24 +02:00
tail tail: Add regression tests for -f and -F 2021-08-14 11:19:42 -04:00
talk ncurses: chase dependency changes in the source tree 2021-10-04 11:38:24 +02:00
tar bsdcat,cpio,tar: derive version string from archive.h 2020-12-29 14:21:50 -08:00
tcopy
tee tee: use queue(9) in place of a custom linked list 2021-09-15 11:04:24 +00:00
telnet ncurses: chase dependency changes in the source tree 2021-10-04 11:38:24 +02:00
tests
tftp Fix a few mandoc issues 2020-10-09 14:03:45 +00:00
time time(1): Add EXAMPLES section 2020-07-07 16:07:39 +00:00
timeout timeout.1: Fix typos in examples 2021-10-21 13:07:32 +02:00
tip Fix some common typos in source code comments 2021-08-28 18:57:23 +02:00
top top.1: Use the Dq macros instead of \*lq and \*rq 2021-11-18 15:56:49 +01:00
touch
tr
true
truncate truncate(1): Update tests' golden output 2021-08-21 17:04:21 +08:00
truss struct kevent_freebsd11 -> struct freebsd11_kevent 2021-11-15 18:34:27 +00:00
tsort tsort(1): Add EXAMPLES section 2020-08-30 17:37:56 +00:00
tty
ul ncurses: chase dependency changes in the source tree 2021-10-04 11:38:24 +02:00
uname uname(1): Fix a typo in the man page date 2020-12-19 12:55:27 +00:00
unexpand
unifdef unifdef.1: Fix typo on "input" 2021-10-05 20:27:16 -04:00
uniq Add EXAMPLES to cover all flags except -f since it is analogous to -s. 2020-06-07 13:21:47 +00:00
units Tell the world how to convert gigabytes to bytes with units(1) easily 2020-03-17 10:02:59 +00:00
unvis
unzip unzip: Fix segmentation fault if a zip file contains buggy filename. 2021-10-10 20:49:19 +09:00
usbhidaction Correct USB HID item in examples 2020-10-28 08:29:31 +00:00
usbhidctl
users Only set WARNS if not defined 2020-09-11 13:28:37 +00:00
uudecode
uuencode
vacation
vgrind Normalize deployment tools usage and definitions by putting into one place 2020-04-07 02:46:22 +00:00
vi ncurses: chase dependency changes in the source tree 2021-10-04 11:38:24 +02:00
vis
vmstat vmstat: correct history 2021-06-21 08:40:54 -06:00
vtfontcvt vtfontcvt: minor style(9) fixes from clang-format 2021-08-04 15:08:21 -04:00
w w(1): Add EXAMPLES to man page 2020-08-24 17:57:08 +00:00
wall
wc wc(1): document SIGINFO handling in the manual page. 2020-04-11 08:16:35 +00:00
what pkgbase: Put a lot of binaries and lib in FreeBSD-runtime 2019-09-05 14:13:08 +00:00
whereis whereis: remove gnu/libexec from source search paths 2020-02-19 14:40:53 +00:00
which Fix typo and environment variable macro 2020-09-24 16:42:17 +00:00
who who(1): Add EXAMPLES section 2020-08-30 17:40:59 +00:00
whois whois: Handle referrals to rwhois servers. 2020-07-09 17:27:14 +00:00
write
xargs pkgbase: Put more binaries/lib in runtime 2021-12-21 10:17:27 +01:00
xinstall pkgbase: Put more binaries/lib in runtime 2021-12-21 10:17:27 +01:00
xo Allow proper builds of libxo's CSV encoder: 2019-12-16 22:05:03 +00:00
xohtml Import libxo-1.4.0: 2020-01-25 21:16:45 +00:00
xolint
xopo
xstr
xz
xzdec
yacc MFV: r362513 2020-07-14 01:54:24 +00:00
yes
ypcat pkgbase: Put yellow pages programs to its own package 2021-12-21 10:17:22 +01:00
ypmatch pkgbase: Put yellow pages programs to its own package 2021-12-21 10:17:22 +01:00
ypwhich pkgbase: Put yellow pages programs to its own package 2021-12-21 10:17:22 +01:00
zstd Only set WARNS if not defined 2020-09-11 13:28:37 +00:00
Makefile beep(1): Initial version of utility to create terminal beep via soundcard. 2021-11-04 09:00:46 +01:00
Makefile.amd64
Makefile.arm
Makefile.i386
Makefile.inc build: provide a default WARNS for all in-tree builds 2020-09-18 17:17:46 +00:00
Makefile.powerpc