NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/55529: [PATCH] script(1): Enable proper playback [-p] of curses sessions



>Number:         55529
>Category:       bin
>Synopsis:       [PATCH] script(1): Enable proper playback [-p] of curses sessions
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 01 07:25:00 +0000 2020
>Originator:     Soumendra Ganguly
>Release:        9.0
>Organization:
Texas A&M University
>Environment:
NetBSD localhost 9.0 NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
The current manpage of script(1) says the following.

"Certain interactive commands, such as vi(1), create garbage in the typescript file. The script utility works best with commands that do not manipulate the screen. The results are meant to emulate a hardcopy terminal."

script(1) is currently able to record [-r] curses sessions perfectly; only the playback functionality [-p] has the above limitation when the terminal is not in raw mode; this patch removes this restriction by appropriately setting terminal attributes.

Additional notes:

. I submitted a similar patch for "scriptreplay(1)" from util-linux; it has now been merged by the maintainer of the project.

. I recently submitted a similar patch for FreeBSD script(1): https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248377

. The patch is in the form of a GitHub pull request: https://github.com/NetBSD/src/pull/14
>How-To-Repeat:
To reproduce the problem, run in a terminal that is not in raw mode. I used https://github.com/iiSeymour/game-of-life to reproduce the problem; authored by GitHub user iiSeymour, this, in the words of the author, is "a python implementation of Conway's Game of Life using the curses module with a small evolutionary twist"; it was written for Linux; therefore, one must call "python gol.py" on NetBSD to bypass the "#!".
>Fix:
I created this GitHub pull request which contains the fix: https://github.com/NetBSD/src/pull/14



Home | Main Index | Thread Index | Old Index