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

fix: restore default SIGPIPE behavior #473

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

lijunchen
Copy link
Contributor

Fix #472

Related Rust issue, rust-lang/rust#46016

Copy link

From the provided git diff output, several changes and updates have been made to the project, particularly in the Cargo.lock file, crates/moonrun/Cargo.toml, and crates/moonrun/src/main.rs. Here are the observations and suggestions based on the changes:

  1. Update to bindgen version:

    • The version of bindgen has been updated from 0.69.4 to 0.69.5. This update might include bug fixes, performance improvements, or new features. Ensure that the new version does not introduce any breaking changes that could affect your project. Review the release notes or changelog of bindgen for details.
  2. Update to libc version:

    • The version of libc has been updated from 0.2.155 to 0.2.162. This is a significant update that might include important fixes or enhancements. Similar to the bindgen update, review the release notes of libc to understand the changes and ensure they do not impact your project negatively.
  3. Addition of libc dependency in crates/moonrun/Cargo.toml:

    • The libc dependency has been added to the crates/moonrun/Cargo.toml file. This indicates that libc is now being used in the moonrun crate. Ensure that all necessary functions and features from libc are being utilized correctly and that there are no redundant dependencies.
  4. Signal handling in crates/moonrun/src/main.rs:

    • A new block of code has been added to handle the SIGPIPE signal using libc. This is typically used to prevent the program from crashing when writing to a closed pipe. However, using unsafe code should be done with caution. Ensure that this signal handling does not interfere with other parts of the program and that it is necessary for the specific use case.
    #[allow(unsafe_code)]
    unsafe {
        libc::signal(libc::SIGPIPE, libc::SIG_DFL);
    }
    • Consider encapsulating this logic in a safe abstraction if possible, to reduce the risk associated with unsafe code.

In summary, the updates to bindgen and libc versions should be reviewed to ensure compatibility and identify any potential breaking changes. The addition of libc as a dependency and the signal handling code should be carefully tested to confirm they function as intended without introducing new issues.

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.

Panic with println on pipeline
1 participant