obots' content='index, nofollow'/>
summaryrefslogtreecommitdiff
path: root/usr.bin/script/script.c
AgeCommit message (Collapse)Author
2023-05-09Reset SIGCHLD handler to SIG_DFL.hgutch
If run with "-c", both child and parent script processes will handle SIGCHLD resulting in a possible duplicate "Script done" line in the output. This fixes bin/54514.
2022-02-131. restore the previous finish() logic to make:christos
script -e -c /usr/bin/true script -e -c /usr/bin/false exit with the proper exit code. 2. handle system return value correctly (nabijaczleweli) 3. factor out the conversion of wait status -> shell return code.
2022-02-12script: declare dooutput as __deadrillig
This fixes the Clang build, which failed with: usr.bin/script/script.c:255:1: error: function 'dooutput' could be declared with attribute 'noreturn' [-Werror,-Wmissing-noreturn]
2022-02-11PR/56254: RVP: Don't call non-async-signal-safe functions from signal handlers.christos
Establish a non-restart signal handler to avoid blocking in long I/Os.
2022-01-20dooutput can return if finish() does not find a chile process.christos
2022-01-16If -e is specified exit with the exit status of the child process inchristos
a shell-like format (nabijaczleweli)
2020-08-31Unlike done() childwait() returns, found by clang.christos
2020-08-28PR/55605: Soumendra Ganguly: Wait for child to finish when stdin is not a ttychristos
2020-08-08PR/55551 Soumendra Ganguly: Simplify tcgetattr error handling.christos
2020-08-07PR/55548: Soumendra Ganguly: Since isatty(3) is implemented usingchristos
tcgetattr(3), call it directly to avoid calling it twice. This makes error handling more precise. Also don't call err(3) when tcsetattr(3) fails.
2020-08-03remove trailing whitespacechristos
2020-08-02PR/55531: Soumendra Ganguly:christos
- add more error handling - handle -p when not a terminal - call termreset() before printing script done, so that it is printed correctly Also: - use ssize_t/size_t instead of int - use EXIT_SUCCESS/EXIT_FAILURE - check result of fork() against -1
2020-08-01PR/55529: Soumendra Ganguly: configure the terminal in raw mode duringchristos
playback so that output postprocessing is not done and playback of programs using curses does not appear corrupted.
2011-09-06static + __deadjoerg
2011-06-08err -> errx where appropriateyamt
2009-10-17use system to parse argschristos
2009-10-17add more features found in other uniceschristos
2009-04-13Fix WARNS=4 issues (-Wcast-qual -Wshadow)lukem
2008-07-21Remove the \n and tabs from the __COPYRIGHT() strings.lukem
Tweak to use a consistent format.
2007-09-09PR/36955: Ighighi: Use fseeko instead of fseek.christos
2007-08-20Apparently seeking forward on a FIFO does not work (why?). Read instead.christos
Patch from Jukka Salmi.
2007-08-19deal with non-regular files.christos
2006-06-14Fix PR: 26363: script core dumps on incorrect input files.liamjfoy
This patch virtually re-writes the playback code and contains improvements (mainly the dependency upon BUFSIZ being the same size as it was wrote at). OK: christos, joerg
2006-03-29ANSIfy. de-P.rpaulo
2004-07-13Add -d to usage; use getprogname(3). From Kouichirou Hiratsuka in PR 26227.wiz
2003-08-07Move UCB-licensed code from 4-clause to 3-clause licence.agc
Patches provided by Joel Baker in PR 22365, verified by myself.
2002-06-21Add an alternate "typescript mode" that contains timestamps and otheratatat
data interleaved between chunks of actual output (and input), and teach script how to read the new format so that sessions can be played back at "proper" time.