Monitoring the death of a parent process (via Dispatch Sources)
来源:互联网 发布:淘宝买家怎么变成卖家 编辑:程序博客网 时间:2024/05/17 17:16
void MonitorParentProcess() { pid_t parentPID = getppid(); dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); dispatch_source_t source = dispatch_source_create(DISPATCH_SOURCE_TYPE_PROC, parentPID, DISPATCH_PROC_EXIT,queue);if (source) { dispatch_source_set_event_handler(source, ^{ MySetAppExitFlag(); dispatch_source_cancel(source); dispatch_release(source);}); dispatch_resume(source); }}
0 0
- Monitoring the death of a parent process (via Dispatch Sources)
- Installing a block to monitor signals (via Dispatch Sources)
- The birth-death process
- Lesson 30 The death of a ghost
- Watching for filename changes (via Dispatch Sources)
- Death of a showman
- Dispatch Sources
- Dispatch Sources
- Dispatch Sources
- Dispatch Sources
- the process of developing a program
- The Process of Submitting a Job
- zoj 2706 Thermal Death of the Universe
- ZOJ2706 Thermal Death of the Universe
- ZOJ2706-Thermal Death of the Universe
- The parent project must have a packaging type of POM
- The parent project must have a packaging type of POM
- The parent project must have a packaging type of POM
- android fragmenttabhost
- NIO框架之MINA源码解析(四):粘包与断包处理及编码与解码
- 嵌入式 Linux环境进程间通信(一):管道
- iOS二维码扫描
- 2014年8月29终于成功从软通动力辞职了
- Monitoring the death of a parent process (via Dispatch Sources)
- 乐观锁与悲观锁
- 嵌入式 Linux 进程间通信几种方式小结
- 【bzoj2548】灭鼠行动解题报告
- JAVA基础知识再学习(3)继承概论 & 子类实例化过程
- 整理了一下 Xcode 快捷键
- git pull 时本地字符集错误
- 嵌入式 Linux环境进程间通信(二):有名管道(FIFO)
- 图解冲突域、广播域