remove chroot when daemonizing (#640)

This commit is contained in:
zonyitoo
2021-10-08 00:13:55 +08:00
parent 76dfdbaaf6
commit 862a8a78b7

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).chroot("/");
let mut d = Daemonize::new().umask(0);
if let Some(p) = pid_path {
d = d.pid_file(p);
}