unlink.c
来自「这个是学习嵌入式开发的重要例子」· C语言 代码 · 共 26 行
C
26 行
#include <stdio.h>#include <stdlib.h>#include <mqueue.h>#include <string.h>#include <errno.h>int main(int argc, char **argv){ if (argc < 2) { fprintf(stdout, "Usage: %s <name>\n", argv[0]); exit(1); } // Upon successful completion, the function shall return a value of zero. Otherwise, the named message // queue shall be unchanged by this function call, and the function shall return a value of -1 and set // errno to indicate the error. if (mq_unlink(argv[1]) < 0) { fprintf(stderr, "mq_unlink() failed: %s\n", strerror(errno)); exit(1); } return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?