当前位置: 首页 > news >正文

wordpress织梦扩展广州seo排名

wordpress织梦扩展,广州seo排名,上海工程造价咨询公司,免费WAP建导航网站未决信号集与阻塞信号集(信号屏蔽字) 阻塞信号集#xff1a; 将某些信号加入集合#xff0c;对他们设置屏蔽#xff0c;当屏蔽x信号后#xff0c;再收到该信号#xff0c;该信号的处理将推后(解除屏蔽后) 未决信号集#xff1a; a. 信号产生#xff0c;未决信号集中描述… 未决信号集与阻塞信号集(信号屏蔽字) 阻塞信号集 将某些信号加入集合对他们设置屏蔽当屏蔽x信号后再收到该信号该信号的处理将推后(解除屏蔽后) 未决信号集 a. 信号产生未决信号集中描述该信号的位立刻翻转为1表信号处于未决状态。当信号被处理对应位翻转回为0。这一时刻往往非常短暂。 b. 信号产生后由于某些原因(主要是阻塞)不能抵达。这类信号的集合称之为未决信号集。在屏蔽解除前信号一直处于未决状态。 相当于 阻塞信号集在未决信号集前面设置了一堵墙 系统api产生信号 kill函数 #include sys/types.h #include signal.h int kill(pid_t pid, int sig);参数介绍 pid 0要发送的进程ID pid 0代表当前进程组内所有进程 pid -1, 代表有权限发送的所有进程 pid -1, 代表 -pid对应组内所有进程 sig 对应的信号 kill函数代码示例 de sys/types.h #include signal.h #include sys/stat.h #include unistd.h #include stdio.hint main() {int i0;pid_t pid;for(; i5; i) {pid fork();if(pid0){break;}}if(i2) {printf(son---%d will kill fatherProgress\n,i);sleep(5);kill(getppid(), SIGKILL);while (1) {sleep(1);}} if(i5) {while(1) {printf(father ----\n);sleep(1);}}return 0; }–分割线– alarm man alarm #include unistd.hunsigned int alarm(unsigned int seconds);alarm() arranges for a SIGALRM signal to be delivered to the calling process in seconds seconds. If seconds is zero, any pending alarm is canceled. In any event any previously set alarm() is canceled. alarm() 函数 给调用者自己发送 一个 SIGALRM 信号在 seconds秒后。 如果 seconds是0 取消之前的 设置的 alarm。 return返回值 返回之前设置的 alarm剩余的秒数如果之前没有设置alarm就返回0. alarm代码示例 #include stdio.h #include signal.h #include unistd.hint main() {int ret_1 alarm(5);printf(%d\n, ret_1);sleep(2);int ret_2 alarm(4);int num 4;printf(%d\n, ret_2);while (1) {printf( will ararm fater %d\n, num--);sleep(1);}return 0; }–分割线– setitimer函数周期性发送信号 man setitimer #include sys/time.h int getitimer(int which, struct itimerval *curr_value); int setitimer(int which, const struct itimerval *new_value, struct itimerval *old_value);参数介绍 which 三种选择 真实时间ITIMER_REAL decrements in real time, and delivers SIGALRM upon expi‐ration.计算进程执行时间ITIMER_VIRTUAL decrements only when the process is executing, anddelivers SIGVTALRM upon expiration.计算进程执行 调度时间 ITIMER_PROF decrements both when the process executes and when thesystem is executing on behalf of the process. Coupledwith ITIMER_VIRTUAL, this timer is usually used to pro‐file the time spent by the application in user and ker‐nel space. SIGPROF is delivered upon expiration.struct itimerval {struct timeval it_interval; /* Interval for periodic timer */ 周期定时器间隔struct timeval it_value; /* Time until next expiration */ 下次执行时间 };struct timeval {time_t tv_sec; /* seconds */ 秒数suseconds_t tv_usec; /* microseconds */ 微秒数 };new_value 要设置的闹钟时间 old_value 原闹钟时间 return 成功返回0 失败-1并设置errno setitimer 代码示例 #include signal.h #include stdio.h #include unistd.h #include sys/time.hvoid catch(int sign) {if(sign SIGALRM) {printf(catch signal is %d\n, sign);} } int main() {signal(SIGALRM, catch);struct itimerval new_value {{3, 0},{1, 0}};setitimer(ITIMER_REAL, new_value, NULL);while (1){printf( setitimer test\n);sleep(1);}return 0; }
http://www.zqtcl.cn/news/452920/

相关文章:

  • 中国房地产网站茂名住房和城乡建设厅网站
  • 做网站销售工资怎么样网页设计是哪个专业
  • 吉林省住房城乡建设厅网站首页微商城模板包含哪些
  • 优秀个人网站案例wordpress 文章格式
  • 2019年做网站装修平面设计图的制作
  • 潍坊网站建设top淘宝客网站名
  • 怎么给网站做外链网上接效果图平台
  • 电影网站建设教程下载怎么经营团购网站
  • 做网站卖什么建设银信用卡网站首页
  • 大连市城乡建设档案馆网站网上竞价采购网站建设
  • 国际物流公司网站建设浏览器正能量网站免费图片
  • 河南做外贸网站的公司怎么做家庭网站
  • 知名营销类网站互联网软件开发是什么工作
  • 做网站前新闻录入网站模板
  • 网站域名做跳转要收费吗科技信息期刊
  • 登别的网站应怎么做网站推广广告词大全集
  • 漯河城乡建设管理局网站wordpress icon class
  • 买空间哪个网站好广州多少网络科技有限公司
  • 网站的网络推广方案营销型网站建设论文
  • 苏州做网站便宜的公司哪家好门店管理系统app
  • 学校多语言网站建设网络维护网站建设培训
  • Wordpress外贸网站搭建公司建站系统的应用场景
  • 网站推广网络推广方wordpress汉语公益
  • 长沙做网站的公司有哪些宁波奉化建设局网站
  • 温岭专业自适应网站建设承德招聘信息网
  • 做公司网站的模板下载wordpress e
  • 网站建设基本知识wordpress 没有小工具
  • 北京完美建设有限公司网站酒店加盟
  • 山东网络推广网站德州市建设局质监站网站
  • api模式网站开发网站打开后显示建设中