In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735
script -r is useful for recording time-stamps of when output
happened. With -T, rather than playback the script in real-time
we simply print the time-stamps to show when the output happened.
This is very useful for example, for analyzing boot time activity.
If the fmt provided contains no % characters the default
%n@ %s [%Y-%m-%d %T]
is used, which lends itself to analysis by tools as well as humans.
Sponsored by: Juniper Networks, Inc.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D34511
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
While here:
- Split synopsis into two parts. The first explains how to record
sessions, while the second one explains how to replay (some of)
the recorded sessions.
- Fix the -width argument of the environment variables list.
MFC after: 1 week
In the util-linux version of script, it will always exit with succes.
Except when run with -e, in which case it will have the exit value of
the child. BSD Script already uses the child's exit value for its exit
value. Some config and other helper scripts depend on being able to
specify -e. Accept it for compatibility since we'll already to the
right thing, but otherwise we ignore it.
- Instead of using isatty() to decide whether to call tcgetattr(), just
call tcgetattr() directly, since that's all that isatty() does anyway.
- Simplify error handling in termset(). Check for errno != ENOTTY from
tcgetattr() to handle errors that may be raised while running
script(1) under a debugger.
PR: 248377
Submitted by: Soumendra Ganguly <soumendraganguly@gmail.com>
MFC after: 1 week
Otherwise recorded sessions of some interactive programs do not play
back properly.
PR: 248377
Submitted by: Soumendra Ganguly <0.gangzta@gmail.com>
MFC after: 1 week
Mainly focus on files that use BSD 3-Clause license.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.
Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96
No functional change.
This is mostly addressing a false-positive from the clang static
analyzer due to it thinking that done() was being called with freed
memory, however the kill(0, SIGTERM) made the done() never reached.
It doesn't make sense to the show the footer from the child anyhow, nor
does it make sense to kill the process group here since the execve(2)
failed in the child. This code was leftover from many years of refactoring.
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
This is the same as how the bmake filemon usage works.
This also fixes failed attach not properly flushing the TTY.
MFC after: 1 week
Relnotes: yes
Sponsored by: EMC / Isilon Storage Division
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.
Still need to add real targets under targets/ to build packages.
Differential Revision: D2796
Reviewed by: brooks imp
set up a pipe and allow a jr user to watch what I'm doing
by running 'script -F pipefile' on it.
While here, spell out the month in the .Dd tag like other
manual pages.