Skip to content

y.sh cargo run swallows the signal emitted by the running process #496

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

Closed
antoyo opened this issue Apr 19, 2024 · 7 comments · Fixed by #509 or #698
Closed

y.sh cargo run swallows the signal emitted by the running process #496

antoyo opened this issue Apr 19, 2024 · 7 comments · Fixed by #509 or #698
Labels
good first issue Good for newcomers

Comments

@antoyo
Copy link
Contributor

antoyo commented Apr 19, 2024

For instance, if the process segfaults, ./y.sh cargo run will not emit a SIGSEGV signal while it should do that.

@antoyo antoyo added the good first issue Good for newcomers label Apr 19, 2024
@GuillaumeGomez
Copy link
Member

I don't think signals should be emitted by the parent as well (in this case, SIGSEGV tells that a memory access was wrong, which is only the case of the child, not the parent). We should display which signal ended the process though if any.

@antoyo
Copy link
Contributor Author

antoyo commented Apr 19, 2024

cargo does it, so I believe we should do the same.

@bjorn3
Copy link
Member

bjorn3 commented Apr 19, 2024

On Unix you could exec cargo instead of spawning it as subprocess. That is what cargo-clif and rustc-clif do.

@antoyo
Copy link
Contributor Author

antoyo commented Jan 5, 2025

In my sync PR, it seems like this is still happening, re-opening just in case.

@antoyo antoyo reopened this Jan 5, 2025
@antoyo
Copy link
Contributor Author

antoyo commented Jan 12, 2025

So, it looks like we return 1 instead of raising the signal of the child process.

@GuillaumeGomez
Copy link
Member

Do we want to re-raise the signal though?

@antoyo
Copy link
Contributor Author

antoyo commented Jan 28, 2025

Yes. I'd like the same behavior as cargo for the y.sh cargo command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
3 participants