Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Handle re-cooking terminal after programs done #3

@pot

Description

@pot

We need to make sure that when the program closes we re-cook the terminal (take it out of raw mode or revert to whatever it was previously). I have attempted to do this in the MacTerminal_intel and MacTerminal_arm64 implementations by storing a cloned MemorySegment of the settings before we make them "raw" and then simply restoring this on shutdown. From my testing it doesn't work and I haven't given it a deeper look. I think more than just a shutdown hook we need a proper api to call this since we cannot assume that the program finishing is the only indicator that they are done using our library. (Generally we should avoid shutdown hooks unless we can clean them up at runtime)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions