摘要:
// threads/exitstatus.c 11-2
#include "apue.h"
#include void* thr_fn1(void* arg)
{ printf("thread 1 returning\n"); /* return a variable of type void* return a pointer who points ... 阅读全文
摘要:
程序清单11-1打印线程ID// threads/threadid.c 11-1
#include "apue.h"
#include pthread_t ntid; void printids(const char* s)
{ printf("%d ", (unsigned int)ntid); printf("%ld ", (uns... 阅读全文
摘要:
// signals/sigusr.c 10-1
#include "apue.h" static void sig_usr(int); /* one handler for both signals */ int main(void)
{ if (signal... 阅读全文
摘要:
// proc/exec1.c 8-8
#include "apue.h"
#include const char* env_init[] = { "USER=unknown", "PATH=/home/sunyj/apue/proc/", NULL }; int main(void)
{ pid_t pid; if ((pid = ... 阅读全文
摘要:
这一节,书中的TELL_WAIT与TELL_PARENT,TELL_CHILD没有弄清楚,到底是如何实现的同步机制。 // proc/tellwait1.c 8-6
#include "apue.h" static void charatatime(const char *); int main(void)
{ pid_t pid; if ((pid = fork()... 阅读全文
摘要:
我的博客主题,css 阅读全文