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

[WIP] Update to nix 0.17. #2

Merged
merged 2 commits into from
Jul 21, 2020
Merged

[WIP] Update to nix 0.17. #2

merged 2 commits into from
Jul 21, 2020

Conversation

ericonr
Copy link
Contributor

@ericonr ericonr commented Jul 20, 2020

Use killpg(pid, sig) instead of kill(-pid, sig).


Hi! The current nix version (0.8) in this library is broken for ppc targets. I would like to update to the latest version (0.17), but from release 0.9 onwards they removed the From<nix::Error> for std::io::Error trait impl: nix-rust/nix#614

Therefore, when compiling, I get these errors:

    Checking unsegen v0.2.4 (/home/ericonr/mypro/ugdb/unsegen)
error[E0277]: `?` couldn't convert the error to `std::io::Error`
  --> src/base/terminal.rs:87:77
   |
87 |         pthread_sigmask(SigmaskHow::SIG_UNBLOCK, Some(&stop_and_cont), None)?;
   |                                                                             ^ the trait `std::convert::From<nix::Error>` is not implemented for `std::io::Error`
   |
   = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
   = help: the following implementations were found:
             <std::io::Error as std::convert::From<nix::errno::Errno>>
             <std::io::Error as std::convert::From<std::ffi::NulError>>
             <std::io::Error as std::convert::From<std::io::ErrorKind>>
             <std::io::Error as std::convert::From<std::io::IntoInnerError<W>>>
   = note: required by `std::convert::From::from`

error[E0277]: `?` couldn't convert the error to `std::io::Error`
  --> src/base/terminal.rs:90:35
   |
90 |         killpg(getpgrp(), SIGTSTP)?;
   |                                   ^ the trait `std::convert::From<nix::Error>` is not implemented for `std::io::Error`
   |
   = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
   = help: the following implementations were found:
             <std::io::Error as std::convert::From<nix::errno::Errno>>
             <std::io::Error as std::convert::From<std::ffi::NulError>>
             <std::io::Error as std::convert::From<std::io::ErrorKind>>
             <std::io::Error as std::convert::From<std::io::IntoInnerError<W>>>
   = note: required by `std::convert::From::from`

error[E0277]: `?` couldn't convert the error to `std::io::Error`
  --> src/base/terminal.rs:95:75
   |
95 |         pthread_sigmask(SigmaskHow::SIG_BLOCK, Some(&stop_and_cont), None)?;
   |                                                                           ^ the trait `std::convert::From<nix::Error>` is not implemented for `std::io::Error`
   |
   = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
   = help: the following implementations were found:
             <std::io::Error as std::convert::From<nix::errno::Errno>>
             <std::io::Error as std::convert::From<std::ffi::NulError>>
             <std::io::Error as std::convert::From<std::io::ErrorKind>>
             <std::io::Error as std::convert::From<std::io::IntoInnerError<W>>>
   = note: required by `std::convert::From::from`

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0277`.
error: could not compile `unsegen`.

To learn more, run the command again with --verbose.

How would you suggest we go about restructuring the code to allow it to work with newer nix versions?

ericonr and others added 2 commits July 19, 2020 21:58
Use killpg(pid, sig) instead of kill(-pid, sig).
@ftilde
Copy link
Owner

ftilde commented Jul 21, 2020 via email

@ftilde ftilde merged commit 649e265 into ftilde:master Jul 21, 2020
@ericonr
Copy link
Contributor Author

ericonr commented Jul 21, 2020

No worries, thanks for the fix!

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.

2 participants