-
Notifications
You must be signed in to change notification settings - Fork 15
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
scubainit ignores SIGPIPE #254
Comments
I believe this is handled by #253, but I haven't looked at it yet. |
Ah yes. I came here looking for an issue and not a PR. I’d imagine the compiler flag will fix it. |
If I understand the problem statement correctly:
Please correct me if I got any of that wrong. |
#!/bin/bash
vers=(2.12.0 2.13.0)
for ver in ${vers[@]}; do
echo "======== Scuba ${ver} ========"
venv="scuba-${ver}"
python3 -m venv $venv || exit $?
${venv}/bin/pip install "scuba==${ver}" || exit $?
${venv}/bin/scuba --version
${venv}/bin/scuba --image debian:12 sh -c "yes | echo abcd"
done Output: $ ./demo.sh
======== Scuba 2.12.0 ========
Requirement already satisfied: scuba==2.12.0 in ./scuba-2.12.0/lib/python3.11/site-packages (2.12.0)
Requirement already satisfied: PyYAML in ./scuba-2.12.0/lib/python3.11/site-packages (from scuba==2.12.0) (6.0.1)
scuba 2.12.0
abcd
======== Scuba 2.13.0 ========
Requirement already satisfied: scuba==2.13.0 in ./scuba-2.13.0/lib/python3.11/site-packages (2.13.0)
Requirement already satisfied: PyYAML in ./scuba-2.13.0/lib/python3.11/site-packages (from scuba==2.13.0) (6.0.1)
scuba 2.13.0
abcd
yes: standard output: Broken pipe This matches the problem described above. As does this: $ strace -o yes.strace yes | echo abcd
|
Rust pre-main code may change the SIGPIPE disposition to ignore: * rust-lang/rust#62569 * rust-lang/rust#97889 We could use the nightly compiler flag -Zon-broken-pipe=inherit to disable this behavior. Instead, we take the simpler route and restore the default disposition ourselves. Fixes #254
Rust pre-main code may change the SIGPIPE disposition to ignore: * rust-lang/rust#62569 * rust-lang/rust#97889 We could use the nightly compiler flag -Zon-broken-pipe=inherit to disable this behavior. Instead, we take the simpler route and restore the default disposition ourselves. Fixes #254
Rust pre-main code may change the SIGPIPE disposition to ignore: * rust-lang/rust#62569 * rust-lang/rust#97889 We could use the nightly compiler flag -Zon-broken-pipe=inherit to disable this behavior. Instead, we take the simpler route and restore the default disposition ourselves. Fixes #254
Rust pre-main code may change the SIGPIPE disposition to ignore: * rust-lang/rust#62569 * rust-lang/rust#97889 We could use the nightly compiler flag -Zon-broken-pipe=inherit to disable this behavior. Instead, we take the simpler route and restore the default disposition ourselves. Fixes #254
The new
scubainit
included in version 2.13.0 ignoresSIGPIPE
, which is then inherited by any process that scuba runs. This behavior is included as a side-effect of the Rust entrypoint. See rust-lang/rust #62569Here's a test case that was shared with me recently and demonstrates the behavior change from
2.12.0
to2.13.0
:Also, to show that
SIGPIPE
is ignored in2.13.0
:I think the correct behavior for scuba is to reset
SIGPIPE
toSIG_DFL
.The text was updated successfully, but these errors were encountered: