mirror of
https://gitlab.redox-os.org/CoffeeCode/redox-ssh.git
synced 2025-12-28 17:02:19 +01:00
Replace deprecated before_exec with pre_exec
> [The `before_exec`] method is stable and usable, but it should be unsafe. > To fix that, it got deprecated in favor of the unsafe [`pre_exec`].
This commit is contained in:
parent
86f0cc82c3
commit
d25d37a751
1 changed files with 7 additions and 5 deletions
|
|
@ -140,11 +140,13 @@ impl Channel {
|
|||
.unwrap()
|
||||
.into_raw_fd();
|
||||
|
||||
process::Command::new("login")
|
||||
.stdin(unsafe { Stdio::from_raw_fd(stdin) })
|
||||
.stdout(unsafe { Stdio::from_raw_fd(stdout) })
|
||||
.stderr(unsafe { Stdio::from_raw_fd(stderr) })
|
||||
.before_exec(|| sys::before_exec()) // TODO: listen to compiler warning
|
||||
unsafe {
|
||||
process::Command::new("login")
|
||||
.stdin(Stdio::from_raw_fd(stdin))
|
||||
.stdout(Stdio::from_raw_fd(stdout))
|
||||
.stderr(Stdio::from_raw_fd(stderr))
|
||||
.pre_exec(|| sys::before_exec())
|
||||
}
|
||||
.spawn()
|
||||
.unwrap();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue