
Linux
文章平均质量分 71
iCode0410
这个作者很懒,什么都没留下…
展开
-
pthread——pthread_cleanup
Pthread_cleanup用于注册线程清理函数,注册的清理函数将在线程被取消或者主动调用pthread_exit时被调用; 一个简单的示例: #include #include // pthread_cleanup_push and pthread_cleanup_pop should be called in pairs at the same le原创 2014-09-11 08:36:23 · 695 阅读 · 0 评论 -
linux fork
貌似是360的笔试题; #include #include int main() {int i;for (i = 0; i < 4; i++) {fork();printf(" - \n");}} icode0410@ubuntu:~/Documents/code/linux/process$ gcc forks.c && ./a.out原创 2014-09-17 21:04:25 · 929 阅读 · 3 评论