View | Details | Raw Unified | Return to bug 57414
Collapse All | Expand All

(-)usr.bin/script/script.1 (+4 lines)
Lines 155-157 Link Here
155
mode, echo cancelling is far from ideal.  The slave terminal mode is checked
155
mode, echo cancelling is far from ideal.  The slave terminal mode is checked
156
for ECHO mode to check when to avoid manual echo logging.  This does not
156
for ECHO mode to check when to avoid manual echo logging.  This does not
157
work when in a raw mode where the program being run is doing manual echo.
157
work when in a raw mode where the program being run is doing manual echo.
158
.Pp
159
The
160
.Nm
161
utility fails if the standard input is not a terminal.
(-)usr.bin/script/script.c (-2 / +4 lines)
Lines 126-133 Link Here
126
	if ((fscript = fopen(fname, aflg ? "a" : "w")) == NULL)
126
	if ((fscript = fopen(fname, aflg ? "a" : "w")) == NULL)
127
		err(1, "%s", fname);
127
		err(1, "%s", fname);
128
128
129
	(void)tcgetattr(STDIN_FILENO, &tt);
129
	if (tcgetattr(STDIN_FILENO, &tt) == -1)
130
	(void)ioctl(STDIN_FILENO, TIOCGWINSZ, &win);
130
		err(1, "tcgetattr");
131
	if (ioctl(STDIN_FILENO, TIOCGWINSZ, &win) == -1)
132
		err(1, "ioctl");
131
	if (openpty(&master, &slave, NULL, &tt, &win) == -1)
133
	if (openpty(&master, &slave, NULL, &tt, &win) == -1)
132
		err(1, "openpty");
134
		err(1, "openpty");

Return to bug 57414