pctl.h~
来自「设有两个并发执行的父子进程」· H~ 代码 · 共 17 行
H~
17 行
#include <sys/types.h>#include <wait.h>#include <unistd.h>#include <signal.h>#include <stdio.h>#include <stdlib.h>typedef void (*sighandler_t)(int);void sigcat1(){ printf("\n%d Process increase by 1\n",getpid()); setpriority(PRIO_PROCESS,getpid(),getpriority(PRIO_PROCESS,getpid())+1);}void sigcat2(){ printf("\n%d Process decrease by 1\n",getpid()); setpriority(PRIO_PROCESS,getpid(),getpriority(PRIO_PROCESS,getpid())-1);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?