3 # Send a signal to a process
5 require './proc-lib.pl';
8 &error_setup(&text('kill_err', $in{signal}, $in{pid}));
9 foreach $s ('KILL', 'TERM', 'HUP', 'STOP', 'CONT') {
10 $in{'signal'} = $s if ($in{$s});
13 %pinfo = &process_info($in{pid});
14 &can_edit_process($pinfo{'user'}) || &error($text{'kill_ecannot'});
15 if (&kill_logged($in{signal}, $in{pid})) {
16 $in{'args0'} = $pinfo{'args'};
17 &webmin_log("kill", undef, undef, \%in);
19 if (&process_info($in{pid})) {
20 # still around.. return to process info
21 &redirect("edit_proc.cgi?$in{pid}");
24 # gone case .. return to list
25 &redirect("index.cgi");
29 # failed to send signal