Skip to content

Foreground process fix - #226

Merged
cmcgee1024 merged 9 commits into
swiftlang:mainfrom
johnbute:foreground-process-fix
Feb 13, 2025
Merged

cmcgee1024 merged 9 commits into
swiftlang:mainfrom
johnbute:foreground-process-fix

Conversation

@johnbute

Copy link
Copy Markdown
Contributor

Fixed a bug where a child process did not set main process back into foreground, causing issues such as not being able to let the user prompt y/n
Motivation:

When a child process is created and set into the foreground then terminates, the main process doesn't have the ability to prompt the user anymore.
Modifications:

Simply add a few lines to transfer the main process back to the foreground once the child process finishes

Result:
Allows for user interaction (user input), better resource management, and signal handling.

John Bute added 2 commits February 7, 2025 12:24
…ould fail if the user gave 'Y' instead of 'y' to continue, now all prompting is consistent
@plemarquand

Copy link
Copy Markdown
Contributor

Fixes #223

@cmcgee1024

Copy link
Copy Markdown
Member

@johnbute this is a really good fix to have. Thanks for tracking this down.

Can you reformat the code, commit and push it?

@cmcgee1024
cmcgee1024 self-requested a review February 12, 2025 16:04
Comment thread Sources/SwiftlyCore/Platform.swift Resolved
Comment thread Sources/SwiftlyCore/Platform.swift Resolved
@cmcgee1024

Copy link
Copy Markdown
Member

@swift-ci test macOS

@cmcgee1024
cmcgee1024 merged commit 7b773c7 into swiftlang:main Feb 13, 2025
@cmcgee1024

Copy link
Copy Markdown
Member

Thank you for your contribution @johnbute . This will be a really good fix to have in swiftly.

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.

3 participants