Cari di Perl 
    Perl User Manual
Daftar Isi
(Sebelumnya) Get current nice valueOpen a pair of connected fileh ... (Berikutnya)
Functions for processes and process groups

Send a signal to a process or process group

Daftar Isi

  • kill SIGNAL, LIST
  • kill SIGNAL

    Sends a signal to a list of processes. Returns the number ofprocesses successfully signaled (which is not necessarily thesame as the number actually killed).

    1. $cnt = kill 1, $child1, $child2;
    2. kill 9, @goners;

    If SIGNAL is zero, no signal is sent to the process, but killchecks whether it's possible to send a signal to it (thatmeans, to be brief, that the process is owned by the same user, or we arethe super-user). This is useful to check that a child process is stillalive (even if only as a zombie) and hasn't changed its UID. Seeperlport for notes on the portability of this construct.

    Unlike in the shell, if SIGNAL is negative, it kills process groups insteadof processes. That means you usuallywant to use positive not negative signals.You may also use a signal name in quotes.

    The behavior of kill when a PROCESS number is zero or negative depends onthe operating system. For example, on POSIX-conforming systems, zero willsignal the current process group and -1 will signal all processes.

    See Signals in perlipc for more details.

    On some platforms such as Windows where the fork() system call is not available.Perl can be built to emulate fork() at the interpreter level.This emulation has limitations related to kill that have to be considered,for code running on Windows and in code intended to be portable.

    See perlfork for more details.

    If there is no LIST of processes, no signal is sent, and the returnvalue is 0. This form is sometimes used, however, because it causestainting checks to be run. But seeLaundering and Detecting Tainted Data in perlsec.

    Portability issues: kill in perlport.

 
Source : perldoc.perl.org - Official documentation for the Perl programming language
Site maintained by Jon Allen (JJ)     See the project page for more details
Documentation maintained by the Perl 5 Porters
(Sebelumnya) Get current nice valueOpen a pair of connected fileh ... (Berikutnya)