FreeBSD Bugzilla – Attachment 216973 Details for
Bug 248377
[PATCH] script(1): Enable proper playback [-p] of curses sessions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
script.diff
script.diff (text/plain), 941 bytes, created by
SOUMENDRA GANGULY
on 2020-08-03 04:18:03 UTC
(
hide
)
Description:
script.diff
Filename:
MIME Type:
Creator:
SOUMENDRA GANGULY
Created:
2020-08-03 04:18:03 UTC
Size:
941 bytes
patch
obsolete
>--- freebsd/usr.bin/script/script.c 2020-08-02 22:58:22.229021555 -0500 >+++ script.c 2020-08-02 23:02:12.298408867 -0500 >@@ -428,6 +428,34 @@ > } while (0/*CONSTCOND*/) > > static void >+termset(void) >+{ >+ struct termios traw; >+ >+ ttyflg = isatty(STDOUT_FILENO); >+ if (!ttyflg) >+ return; >+ >+ if (tcgetattr(STDOUT_FILENO, &tt) == -1) >+ err(1, "tcgetattr"); >+ >+ traw = tt; >+ cfmakeraw(&traw); >+ traw.c_lflag |= ISIG; >+ if (tcsetattr(STDOUT_FILENO, TCSANOW, &traw) == -1) >+ err(1, "tcsetattr"); >+} >+ >+static void >+termreset(void) >+{ >+ if (ttyflg) >+ tcsetattr(STDOUT_FILENO, TCSADRAIN, &tt); >+ >+ ttyflg = 0; >+} >+ >+static void > playback(FILE *fp) > { > struct timespec tsi, tso; >@@ -470,8 +498,11 @@ > ctime(&tclock)); > tsi = tso; > (void)consume(fp, stamp.scr_len, buf, reg); >+ termset(); >+ atexit(termreset); > break; > case 'e': >+ termreset(); > if (!qflg) > (void)printf("\nScript done on %s", > ctime(&tclock));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 248377
:
216900
|
216951
|
216973
|
217063
|
217091