阅读背景:

“对mknod的未定义引用”如何解决这个问题?

来源:互联网 
/*Creating a special file */
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>

int main(int argc, char *argv[]){
    int result;
    if (argc != 2) {
        fprintf(stderr, "Usage: ./a.out fifoname\n");
        exit (1);
     }
    result = mknod (argv[1], S_IRUSR| S_IWUSR|S_IFIFO, 0);
    if (result < 0) {
        perror ("mknod");
        exit (2);
       }
  }
/*Creating a special file */
#include <stdio.h>



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

分享到: