@@ 38,9 38,12 @@ use futures_lite::{
use is_executable::IsExecutable;
use log::{debug, error};
use sha2::{Digest, Sha256};
-use std::{ffi::{OsStr, OsString}, time::Duration};
use std::{collections::HashMap, net::IpAddr};
use std::{
+ ffi::{OsStr, OsString},
+ time::Duration,
+};
+use std::{
io::ErrorKind,
path::{Path, PathBuf},
};
@@ 113,6 116,10 @@ pub async fn serve_cgi<'a>(
cmd.uid(user.uid());
cmd.gid(user.primary_group_id());
}
+ }
+ }
+ cfg_if::cfg_if! {
+ if #[cfg(linux)] {
unsafe {
cmd.pre_exec(|| {
libc::prctl(libc::PR_SET_PDEATHSIG, libc::SIGHUP);