Skip to content

Enable macOS foreground process handling - #9909

Merged
fdncred merged 3 commits into
nushell:mainfrom
IanManske:macos-process-handling
Aug 4, 2023
Merged

fdncred merged 3 commits into
nushell:mainfrom
IanManske:macos-process-handling

Conversation

@IanManske

Copy link
Copy Markdown
Member

Description

Currently, foreground process management is disabled for macOS, since the original code had issues (see #7068).
This PR re-enables process management on macOS in combination with the changes from #9693.

User-Facing Changes

Fixes hang on exit for nested nushells on macOS (issue #9859). Nushell should now manage processes in the same way on macOS and other unix systems.

@IanManske

Copy link
Copy Markdown
Member Author

In a macOS 13 virtual machine, I was unable to reproduce the issue in #9859 or any issues with cargo test --workspace --features=extra using this PR. I will continue testing for a little while longer, but it looks good so far. Also, issue #9859 is particularly bad (sorry!), so we might want to include this PR or #9893 in a patch release.

@fdncred

fdncred commented Aug 3, 2023

Copy link
Copy Markdown
Contributor

From MacOS

  1. run release version of nushell
  2. cargo run to build and run a debug version
  3. exit <-- it hangs here

@IanManske

Copy link
Copy Markdown
Member Author

@fdncred Let me check again, but both versions of nushell have to be built from this PR

@fdncred

fdncred commented Aug 3, 2023 •

Copy link
Copy Markdown
Contributor

ok, i was using one that had been and one that had not been. i'll do another test.

@fdncred

fdncred commented Aug 3, 2023

Copy link
Copy Markdown
Contributor
  1. compile this PR in release mode and run it
  2. compile this PR in debug mode and run it
  3. exit <-- NO hangs!! 🥳

@IanManske

Copy link
Copy Markdown
Member Author

Ok, looking at the source code of other shells, none seem to handle macOS differently in terms of job management. So, I think this is good to go!

@IanManske
IanManske marked this pull request as ready for review August 4, 2023 19:15
@fdncred

fdncred commented Aug 4, 2023

Copy link
Copy Markdown
Contributor

Let's move forward with this. Hopefully we won't experience any more issues. It's such a tough area to code. Nice work!

@fdncred
fdncred merged commit f615038 into nushell:main Aug 4, 2023
@IanManske
IanManske deleted the macos-process-handling branch October 30, 2023 23:43
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

Successfully merging this pull request may close these issues.

2 participants