Revert "remove chroot when daemonizing (#640)"

This reverts commit 862a8a78b7.
This commit is contained in:
zonyitoo
2021-10-08 01:16:06 +08:00
parent 42451a3e39
commit 593630833c

View File

@@ -8,7 +8,7 @@ use log::error;
/// This function will redirect `stdout`, `stderr` to `/dev/null`,
/// and follow the exact behavior in shadowsocks-libev
pub fn daemonize<F: AsRef<Path>>(pid_path: Option<F>) {
let mut d = Daemonize::new().umask(0);
let mut d = Daemonize::new().umask(0).chroot("/");
if let Some(p) = pid_path {
d = d.pid_file(p);
}