Skip to content

Commit

Permalink
Fix: fork() call is unsafe now
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
  • Loading branch information
matthiasbeyer committed Oct 9, 2022
1 parent 64f928a commit 1dfafa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl PtyProcess {
// on Linux this is the libc function, on OSX this is our implementation of ptsname_r
let slave_name = ptsname_r(&master_fd)?;

match fork()? {
match unsafe { fork()? } {
ForkResult::Child => {
setsid()?; // create new session with child as session leader
let slave_fd = open(
Expand Down

0 comments on commit 1dfafa9

Please # to comment.