Skip to content

fish sometimes hangs on launch when calling ttyname on macOS #12506

@nadiaholmquist

Description

@nadiaholmquist

Fish version: 4.5.0 - installed from nixpkgs
OS: macOS
Terminal: iTerm2 Build 3.6.6

After a seemingly random amount of time, fish processes start hanging on start. The culprit might be the ttyname call here:

nix::unistd::ttyname(unsafe { std::os::fd::BorrowedFd::borrow_raw(STDIN_FILENO) })

I have taken a trace of the process in the hung state from Activity Monitor here Prøve på fish.txt

As it happens randomly, I don't know of any reliable way to reproduce the bug, but if that function indeed is the culprit, then simply making it always return false instead of doing the check could work as a workaround, as it doesn't seem like any of the situations where it's used are relevant to macOS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions