From 8b72391d29793284763270b7ae76c0feca828e84 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 9 Oct 2022 10:13:35 +0200 Subject: [PATCH] Fix: fork() call is unsafe now Signed-off-by: Matthias Beyer --- src/process.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/process.rs b/src/process.rs index 9838f698..1bee7b8e 100644 --- a/src/process.rs +++ b/src/process.rs @@ -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(