Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tokio-pty-process] pty.resize does not work on macOS #305

Open
samuela opened this issue Nov 25, 2023 · 2 comments
Open

[tokio-pty-process] pty.resize does not work on macOS #305

samuela opened this issue Nov 25, 2023 · 2 comments

Comments

@samuela
Copy link

samuela commented Nov 25, 2023

This:

use tokio_pty_process::PtyMaster;

fn main() {
  let pty = tokio_pty_process::AsyncPtyMaster::open().unwrap();
  pty.resize(24, 80).unwrap();
}

gives me:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 25, kind: Uncategorized, message: "Inappropriate ioctl for device" }', src/bin/foo.rs:6:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

See also doy/pty-process#7 (comment).

@pkgw
Copy link
Owner

pkgw commented Nov 25, 2023

Thanks for reporting! Do you think that a change along the lines of the one described in doy/pty-process#7 (comment) would help here?

Unfortunately I'm not currently able to put time into proactively maintaining this crate, but I will be happy to review and merge pull requests if you (or anyone else) would like to tackle this issue.

@samuela
Copy link
Author

samuela commented Nov 26, 2023

Thanks for reporting! Do you think that a change along the lines of the one described in doy/pty-process#7 (comment) would help here?

Hmm, idk! It's an interesting question!

For the time being I'm just waiting to call resize until after spawning a process. That seems to work fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants