mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
Fixed that a zombie process is created after udp server executes a command.
(cherry picked from commit 495cdf501d6f483a4c06fd62501dc7b7268ada9f)
This commit is contained in:
parent
5a0b4bab85
commit
ea97e7b687
@ -1912,10 +1912,7 @@ sub udp_server ($$) {
|
||||
$process_name =~ s/\s*$//g;
|
||||
if (defined($Conf{"process_${process_name}_start"})) {
|
||||
log_message ('udp server', "Process $process_name started from $hishost");
|
||||
if (fork() == 0) {
|
||||
`$Conf{"process_${process_name}_start"} 2>$DevNull`;
|
||||
exit 0;
|
||||
}
|
||||
system "$Conf{\"process_${process_name}_start\"} 2>$DevNull &";
|
||||
} else {
|
||||
log_message ('udp server', "Attempt to start unknown process $process_name from $hishost");
|
||||
}
|
||||
@ -1926,10 +1923,7 @@ sub udp_server ($$) {
|
||||
$process_name =~ s/\s*$//g;
|
||||
if (defined($Conf{"process_${process_name}_stop"})) {
|
||||
log_message ('udp server', "Process $process_name stopped from $hishost");
|
||||
if (fork() == 0) {
|
||||
`$Conf{"process_${process_name}_stop"} 2>$DevNull`;
|
||||
exit 0;
|
||||
}
|
||||
system "$Conf{\"process_${process_name}_stop\"} 2>$DevNull &";
|
||||
} else {
|
||||
log_message ('udp server', "Attempt to stop unknown process $process_name from $hishost");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user