有名信号量的使用
sem.c//sem.c/* when compile,should link lib pthread.like this: $(CC) sem.c -o sem -lpthread*/#include <stdlib.h>#include <stdio.h>#include <fcntl.h>#include <sys/stat.h>#include <sys/semaphore.h