(PHP 5 >= 5.3.0, PHP 7)
pcntl_sigprocmask — 锟斤拷锟矫伙拷锟斤拷锟斤拷锟斤拷锟斤拷藕锟�
$how
, array $set
[, array &$oldset
] ) : bool
锟斤拷锟斤拷pcntl_sigprocmask()锟斤拷锟斤拷锟斤拷锟接o拷删锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟脚号o拷锟斤拷锟斤拷锟斤拷为
锟斤拷锟斤拷锟节诧拷锟斤拷how
锟斤拷
how
锟斤拷锟斤拷pcntl_sigprocmask()锟斤拷锟斤拷锟斤拷锟斤拷为锟斤拷 锟斤拷选值:
SIG_BLOCK
: 锟斤拷锟脚号硷拷锟诫到锟斤拷前锟斤拷锟斤拷锟脚猴拷锟叫★拷SIG_UNBLOCK
: 锟接碉拷前锟斤拷锟斤拷锟脚猴拷锟斤拷锟狡筹拷锟脚号★拷SIG_SETMASK
: 锟矫革拷锟斤拷锟斤拷锟脚猴拷锟叫憋拷锟芥换锟斤拷前锟斤拷锟斤拷锟脚猴拷锟叫憋拷set
锟脚猴拷锟叫憋拷
oldset
oldset
锟斤拷一锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟街帮拷锟斤拷锟斤拷锟斤拷藕锟斤拷斜锟斤拷锟斤拷椤�
锟缴癸拷时锟斤拷锟斤拷 TRUE
锟斤拷 锟斤拷锟斤拷锟斤拷失锟斤拷时锟斤拷锟斤拷 FALSE
锟斤拷
Example #1 pcntl_sigprocmask() 示锟斤拷
<?php
//锟斤拷SIGHUP锟脚号硷拷锟诫到锟斤拷锟斤拷锟脚猴拷锟斤拷
pcntl_sigprocmask(SIG_BLOCK, array(SIGHUP));
$oldset = array();
//锟斤拷SIGHUP锟斤拷锟斤拷锟斤拷锟脚猴拷锟叫憋拷锟斤拷锟狡筹拷锟斤拷锟斤拷锟斤拷之前锟斤拷锟斤拷锟斤拷锟脚猴拷锟叫憋拷
pcntl_sigprocmask(SIG_UNBLOCK, array(SIGHUP), $oldset);
?>