parent
633659c237
commit
5b913e2760
@ -1,2 +1,3 @@
|
|||||||
/ctrlc-3.0.3.crate
|
/ctrlc-3.0.3.crate
|
||||||
/ctrlc-3.1.0.crate
|
/ctrlc-3.1.0.crate
|
||||||
|
/ctrlc-3.1.1.crate
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
From 485f893f851eb3eb74ba32182a579c0faf10fd94 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Josh Stone <cuviper@gmail.com>
|
|
||||||
Date: Mon, 26 Feb 2018 23:58:32 -0800
|
|
||||||
Subject: [PATCH] Update to nix 0.10
|
|
||||||
|
|
||||||
---
|
|
||||||
src/platform/unix.rs | 12 ++++++++----
|
|
||||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/platform/unix.rs b/src/platform/unix.rs
|
|
||||||
index 18cf3d8..2bbd5e3 100644
|
|
||||||
--- a/src/platform/unix.rs
|
|
||||||
+++ b/src/platform/unix.rs
|
|
||||||
@@ -44,7 +44,7 @@ pub unsafe fn init_os_handler() -> Result<(), Error> {
|
|
||||||
use self::nix::fcntl;
|
|
||||||
use self::nix::sys::signal;
|
|
||||||
|
|
||||||
- PIPE = unistd::pipe2(fcntl::O_CLOEXEC).map_err(|e| Error::System(nix_err_to_io_err(e)))?;
|
|
||||||
+ PIPE = unistd::pipe2(fcntl::OFlag::O_CLOEXEC).map_err(|e| Error::System(nix_err_to_io_err(e)))?;
|
|
||||||
|
|
||||||
let close_pipe = |e: nix::Error| -> Error {
|
|
||||||
unistd::close(PIPE.1).is_ok();
|
|
||||||
@@ -53,12 +53,16 @@ pub unsafe fn init_os_handler() -> Result<(), Error> {
|
|
||||||
};
|
|
||||||
|
|
||||||
// Make sure we never block on write in the os handler.
|
|
||||||
- if let Err(e) = fcntl::fcntl(PIPE.1, fcntl::FcntlArg::F_SETFL(fcntl::O_NONBLOCK)) {
|
|
||||||
+ if let Err(e) = fcntl::fcntl(PIPE.1, fcntl::FcntlArg::F_SETFL(fcntl::OFlag::O_NONBLOCK)) {
|
|
||||||
return Err(close_pipe(e));
|
|
||||||
}
|
|
||||||
|
|
||||||
let handler = signal::SigHandler::Handler(os_handler);
|
|
||||||
- let new_action = signal::SigAction::new(handler, signal::SA_RESTART, signal::SigSet::empty());
|
|
||||||
+ let new_action = signal::SigAction::new(
|
|
||||||
+ handler,
|
|
||||||
+ signal::SaFlags::SA_RESTART,
|
|
||||||
+ signal::SigSet::empty(),
|
|
||||||
+ );
|
|
||||||
|
|
||||||
let _old = match signal::sigaction(signal::Signal::SIGINT, &new_action) {
|
|
||||||
Ok(old) => old,
|
|
||||||
@@ -97,7 +101,7 @@ pub unsafe fn block_ctrl_c() -> Result<(), Error> {
|
|
||||||
match unistd::read(PIPE.0, &mut buf[..]) {
|
|
||||||
Ok(1) => break,
|
|
||||||
Ok(_) => return Err(Error::System(io::ErrorKind::UnexpectedEof.into()).into()),
|
|
||||||
- Err(nix::Error::Sys(nix::Errno::EINTR)) => {}
|
|
||||||
+ Err(nix::Error::Sys(nix::errno::Errno::EINTR)) => {}
|
|
||||||
Err(e) => return Err(Error::System(nix_err_to_io_err(e))),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.16.2
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
--- ctrlc-3.1.0/Cargo.toml 1970-01-01T01:00:00+01:00
|
|
||||||
+++ ctrlc-3.1.0/Cargo.toml 2018-03-08T21:10:30.966416+01:00
|
|
||||||
@@ -29,9 +29,4 @@
|
|
||||||
[features]
|
|
||||||
termination = []
|
|
||||||
[target."cfg(unix)".dependencies.nix]
|
|
||||||
-version = "0.9"
|
|
||||||
-[target."cfg(windows)".dependencies.kernel32-sys]
|
|
||||||
-version = "0.2"
|
|
||||||
-
|
|
||||||
-[target."cfg(windows)".dependencies.winapi]
|
|
||||||
-version = "0.2"
|
|
||||||
+version = "0.10"
|
|
@ -0,0 +1,12 @@
|
|||||||
|
--- ctrlc-3.1.1/Cargo.toml 1970-01-01T01:00:00+01:00
|
||||||
|
+++ ctrlc-3.1.1/Cargo.toml 2018-07-17T09:55:32.501826+02:00
|
||||||
|
@@ -30,9 +30,3 @@
|
||||||
|
termination = []
|
||||||
|
[target."cfg(unix)".dependencies.nix]
|
||||||
|
version = "0.11"
|
||||||
|
-[target."cfg(windows)".dependencies.winapi]
|
||||||
|
-version = "0.3"
|
||||||
|
-features = ["consoleapi", "handleapi", "synchapi", "winbase"]
|
||||||
|
-[target."cfg(windows)".dev-dependencies.winapi]
|
||||||
|
-version = "0.3"
|
||||||
|
-features = ["fileapi", "processenv", "winnt"]
|
@ -1 +1 @@
|
|||||||
SHA512 (ctrlc-3.1.0.crate) = f06cc8120873289cd2c34d4209ee33dfbaada9c57bfb8d126a6cabaca9c9dbb705a0582df76488771a418eb078dc2074fce6a6b1ffbde4c32e38069af418cd1c
|
SHA512 (ctrlc-3.1.1.crate) = 31e7208a6e6d2b8ff2e00dd9e12cdba3ba9eac24418cd3df137648698bb9489f4bf0b7cb8b28bacf3300c44a6001b4c4fe7f87fc11d3d47e2f0cca7f8b0d70fd
|
||||||
|
Loading…
Reference in new issue