阅读背景:

信号中断时可用共享内存

来源:互联网 

I'm writing a program in C and I'm creating a couple of child processes which use POSIX shared memory. Now I am trying to handle the case when the program is interrupted by signal like SIGINT. I know, I need to install signal function and it isn't good to free resources directly in signal handler because of the inconsistency of the code so it is necessary just to switch the boolean flag. Meanwhile my main code in is loop until the flag is switched.I'm writing a program in C and I'm creating a c




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: