Method kill()
- Method
kill
boolkill(intpid,intsignal)- Description
Send a signal to another process.
Some signals and their supposed purpose:
SIGHUPHang-up, sent to process when user logs out.
SIGINTInterrupt, normally sent by ctrl-c.
SIGQUITQuit, sent by ctrl-\.
SIGILLIllegal instruction.
SIGTRAPTrap, mostly used by debuggers.
SIGABRTAborts process, can be caught, used by Pike whenever something goes seriously wrong.
SIGEMTEmulation trap.
SIGFPEFloating point error (such as division by zero).
SIGKILLReally kill a process, cannot be caught.
SIGBUSBus error.
SIGSEGVSegmentation fault, caused by accessing memory where you shouldn't. Should never happen to Pike.
SIGSYSBad system call. Should never happen to Pike.
SIGPIPEBroken pipe.
SIGALRMSignal used for timer interrupts.
SIGTERMTermination signal.
SIGUSR1Signal reserved for whatever you want to use it for. Note that some OSs reserve this signal for the thread library.
SIGUSR2Signal reserved for whatever you want to use it for. Note that some OSs reserve this signal for the thread library.
SIGCHLDChild process died. This signal is reserved for internal use by the Pike run-time.
SIGPWRPower failure or restart.
SIGWINCHWindow change signal.
SIGURGUrgent socket data.
SIGIOPollable event.
SIGSTOPStop (suspend) process.
SIGTSTPStop (suspend) process. Sent by ctrl-z.
SIGCONTContinue suspended.
SIGTTINTTY input for background process.
SIGTTOUTTY output for background process.
SIGVTALRMVirtual timer expired.
SIGPROFProfiling trap.
SIGXCPUOut of CPU.
SIGXFSZFile size limit exceeded.
SIGSTKFLTStack fault
- Returns
1Success.
0Failure. errno() is set to EINVAL, EPERM or ESRCH.
- Note
Note that you have to use signame to translate the name of a signal to its number.
Note that the kill function is not available on platforms that do not support signals. Some platforms may also have signals not listed here.
- See also