| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In r225809 the intention was to send VEOF only once if STDIN was not a
terminal. Unfortunately the fix was incorrect and for flushtime > 0 it
keept sending VEOF.
Sent VEOF generates ^D\b\b echoed by the terminal, which was reported
in bin/161526. Note, we still send VEOF at least once. Otherwise
commands like below would hang forever:
echo 1 |script /tmp/script.out cat
PR: bin/161526
Reported by: Adrian Wontroba <aw1@stade.co.uk>, Stefan Bethke <stb@lassitu.de>
Tested by: Stefan Bethke <stb@lassitu.de>
Notes:
svn path=/stable/7/; revision=226593
|
| |
|
|
|
|
|
|
|
| |
- Fix a few grammar and mdoc nits in script.1
PR: 161088
Notes:
svn path=/stable/7/; revision=226189
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Reported by: Ronald Klop <ronald-freebsd8@klop.yi.org>
Discussed with: kib, Chris Torek <chris.torek@gmail.com>
Notes:
svn path=/stable/7/; revision=225968
|
| |
|
|
|
|
|
|
|
| |
+ Add the SCRIPT environmental variable to the sub-shell.
+ Add the 'command' argument (if supplied on the command line)
to the typescript file.
Notes:
svn path=/stable/7/; revision=213828
|
| |
|
|
| |
Notes:
svn path=/head/; revision=131507
|
| |
|
|
| |
Notes:
svn path=/head/; revision=131491
|
| |
|
|
|
|
|
| |
Fixed markup nit.
Notes:
svn path=/head/; revision=129433
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
read EOF from STDIN_FILENO, write zero bytes into the pseudo-terminal;
this is interpreted as an EOF by the program being scripted.
I've tested this with two non-interactive scripts:
# echo 5 | script foo sh -c 'read x; sleep $x; echo bar'
# echo bar | xargs script foo echo
and one interactive program:
# script foo more /etc/passwd
and everything seems to work properly...
PR: bin/56166, bin/57414, ports/57415, ports/60534
Approved by: rwatson (mentor)
MFC after: 2 weeks
Notes:
svn path=/head/; revision=125848
|
| |
|
|
|
|
|
|
|
|
|
|
| |
re-breaks non-interactive portupgrade (or at least old versions of
portupgrade); I'll see if I can put together a solution which avoids
breaking anything later.
Approved by: rwatson (mentor)
Noticed by: Stefan Farfeleder, Joshua Goodall
Notes:
svn path=/head/; revision=125101
|
| |
|
|
|
|
|
| |
Sync usage with manpage.
Notes:
svn path=/head/; revision=124846
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Don't do tty stuff to stdin if stdin isn't a tty.
2. When running in non-interactive mode, don't select(2)
on the standard input.
This un-breaks non-interactive portupgrade.
PR: bin/59036 [1]
PR: bin/56166, bin/57414, ports/57415, ports/60534 [2]
MFC after: 7 days
Approved by: rwatson (mentor)
Notes:
svn path=/head/; revision=124845
|
| |
|
|
|
|
|
| |
argument, command is.
Notes:
svn path=/head/; revision=119851
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.
Reviewed by: md5
Notes:
svn path=/head/; revision=102944
|
| |
|
|
|
|
|
|
| |
deprecated 4.2/4.3BSD wait union. Fix some nearby pid_t/int
confusion.
Notes:
svn path=/head/; revision=97788
|
| |
|
|
| |
Notes:
svn path=/head/; revision=95124
|
| |
|
|
| |
Notes:
svn path=/head/; revision=92922
|
| |
|
|
| |
Notes:
svn path=/head/; revision=87768
|
| |
|
|
|
|
|
|
|
|
|
| |
of the recent WARNS commits. The idea is:
1) FreeBSD id tags should follow vendor tags.
2) Vendor tags should not be compiled (though copyrights probably should).
3) There should be no blank line between including cdefs and __FBSDIF.
Notes:
svn path=/head/; revision=87628
|
| |
|
|
| |
Notes:
svn path=/head/; revision=87296
|
| |
|
|
|
|
|
|
|
|
| |
definitions are more readable, and it's possible that they're
more portable to pathalogical platforms.
Submitted by: David Hill <david@phobia.ms>
Notes:
svn path=/head/; revision=80381
|
| |
|
|
| |
Notes:
svn path=/head/; revision=79755
|
| |
|
|
| |
Notes:
svn path=/head/; revision=79535
|
| |
|
|
|
|
|
| |
Idea from: Theo de Raadt <deraadt@openbsd.org>
Notes:
svn path=/head/; revision=79452
|
| |
|
|
| |
Notes:
svn path=/head/; revision=78737
|
| |
|
|
| |
Notes:
svn path=/head/; revision=68963
|
| |
|
|
| |
Notes:
svn path=/head/; revision=62897
|
| |
|
|
|
|
|
| |
a bit.
Notes:
svn path=/head/; revision=57786
|
| |
|
|
| |
Notes:
svn path=/head/; revision=57695
|
| |
|
|
|
|
|
|
| |
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
Notes:
svn path=/head/; revision=57670
|
| |
|
|
| |
Notes:
svn path=/head/; revision=54579
|
| |
|
|
| |
Notes:
svn path=/head/; revision=53670
|
| |
|
|
| |
Notes:
svn path=/head/; revision=50477
|
| |
|
|
|
|
|
|
|
| |
PR: 2851
Reported by: era@iki.fi
Obtained from: NetBSD
Notes:
svn path=/head/; revision=49646
|
| |
|
|
|
|
|
|
| |
PR: docs/8009
Submitted by: Stefan Eggers <seggers@semyam.dinoco.de>
Notes:
svn path=/head/; revision=39741
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- if a command was specified and script(1) failed to execute it,
it would print the name of your shell in the error message
instead of that of the command that failed.
- since finish() was installed as a SIGCHLD handler, it would
often run before the main loop had had time to process the
last few bytes of output. This resulted in very strange
truncated error messages.
- script(1) would almost always return with an exit status of 0,
even if the command returned a non-zero exit status. This broke
my 'build world, install it and rebuild the kernel' scripts
because 'make installworld' would run even if 'make buildworld'
had failed.
Notes:
svn path=/head/; revision=39481
|
| |
|
|
|
|
|
|
| |
PR: 6856
Submitted by: Josh Gilliam <josh@quick.net>
Notes:
svn path=/head/; revision=36649
|
| |
|
|
|
|
|
|
| |
This allows simple logging of keys sent to a session (turned on with -k).
Also allow specifying the script file flush interval.
Notes:
svn path=/head/; revision=34295
|
| |
|
|
|
|
|
| |
Use execvp rather than execv so that full paths are not needed.
Notes:
svn path=/head/; revision=32108
|
| |
|
|
|
|
|
|
| |
since I first saw it. I finally needed to pass arguments through to
the spawned command badly enough (and urgently) that I threw this together.
Notes:
svn path=/head/; revision=32083
|
| |
|
|
| |
Notes:
svn path=/head/; revision=27980
|
| |
|
|
|
|
|
| |
posix standard on the topic.
Notes:
svn path=/head/; revision=24360
|
| |
|
|
|
|
|
|
|
| |
for gcc >= 2.5 and no-ops for gcc >= 2.6. Converted to use __dead2
or __pure2 where it wasn't already done, except in math.h where use
of __pure was mostly wrong.
Notes:
svn path=/head/; revision=18286
|
| |
|
|
|
|
|
| |
which is no longer bogusly installed in /usr/include.
Notes:
svn path=/head/; revision=9987
|
|
|
Notes:
svn path=/cvs2svn/branches/CHRISTOS/; revision=1590
|