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

Set SysProcAttr Foreground: true when user run cmd. Fixes: #404 #405

Merged
merged 1 commit into from Jan 5, 2024

Conversation

sarim
Copy link
Contributor

@sarim sarim commented Jan 4, 2024

Fixes: #404

Details description at linked issue. Setting SysProcAttr Setpgid: true in a previous commit ff1958f broke interactivty with symfony run. With things like symfony run psql.

This PR sets Foreground based on runmode. It works in linux. Should work in macos too hopefully.

Not exactly related to this issue/PR, but runner_windows.go is basically dummy. So not sure worker lifecycle/signals/docker integration etc.. works perfectly in windows.

@fabpot fabpot merged commit e6e203f into symfony-cli:main Jan 5, 2024
1 check passed
@fabpot
Copy link
Contributor

fabpot commented Jan 5, 2024

Thank you @sarim

@tgalopin
Copy link

tgalopin commented Jan 9, 2024

Hi @sarim ! I think maybe #409 is related to this, maybe we should also use the interactivity detection (flag/terminal) when populating the Foreground argument?

fabpot added a commit that referenced this pull request Jan 19, 2024
This reverts commit e6e203f, reversing
changes made to 6a10856.
@fabpot
Copy link
Contributor

fabpot commented Jan 19, 2024

Reverted fornow (with #410 as well) as it doesn't work (at least on Macos where it hangs and ^C doesn't work anymore).

@sarim
Copy link
Contributor Author

sarim commented Jan 19, 2024

Reverted fornow (with #410 as well) as it doesn't work (at least on Macos where it hangs and ^C doesn't work anymore).

@fabpot interesting, so "symfony run psql" works for you in macos without setting Foreground? Do postgresql prompt appears and you can write a query, press enter and get results back? If so then I can rework to set foreground on only linux.

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

Successfully merging this pull request may close these issues.

"symfony run" interactivity broken after v5.7.5
3 participants