Fix for better logging

This commit is contained in:
iliajie
2022-11-12 19:56:55 +02:00
parent 5991d905e3
commit e7f7aaaad5

View File

@@ -65,13 +65,15 @@ if ($config{'rcfile'}) {
}
}
my ($shellfh, $pid) = &proc::pty_process_exec($shellexec, $uid, $gid, $shelllogin);
print STDERR "using shell command '$shellexec".($shelllogin ? " $shelllogin" : undef)."'\n";
&reset_environment();
my $shcmd = "'$shellexec".($shelllogin ? " $shelllogin" : undef)."'";
if (!$pid) {
&cleanup_miniserv();
die "Failed to run shell $uinfo[8]";
die "Failed to run shell with $shcmd\n";
}
else {
print STDERR "Running shell $shcmd with pid $pid\n";
}
print STDERR "shell process is $pid\n";
# Detach from controlling terminal
if (fork()) {