| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/home/SERVERWEB/webmin-2.105/proc/ |
Upload File : |
#!/usr/bin/perl
# kill_proc.cgi
# Send a signal to a process
require './proc-lib.pl';
&ReadParse();
&switch_acl_uid();
&error_setup(&text('kill_err', $in{signal}, $in{pid}));
foreach $s ('KILL', 'TERM', 'HUP', 'STOP', 'CONT') {
$in{'signal'} = $s if ($in{$s});
}
%pinfo = &process_info($in{pid});
&can_edit_process($pinfo{'user'}) || &error($text{'kill_ecannot'});
if (&kill_logged($in{signal}, $in{pid})) {
$in{'args0'} = $pinfo{'args'};
&webmin_log("kill", undef, undef, \%in);
sleep(1);
if (&process_info($in{pid})) {
# still around.. return to process info
&redirect("edit_proc.cgi?$in{pid}");
}
else {
# gone case .. return to list
&redirect("index.cgi");
}
}
else {
# failed to send signal
&error("$!");
}