📄 doorinfo.c
字号:
#include "unpipc.h"intmain(int argc, char **argv){ int fd; struct stat stat; struct door_info info; if (argc != 2) err_quit("usage: doorinfo <pathname>"); fd = Open(argv[1], O_RDONLY); Fstat(fd, &stat); if (S_ISDOOR(stat.st_mode) == 0) err_quit("pathname is not a door"); Door_info(fd, &info); printf("server PID = %ld, uniquifier = %ld", (long) info.di_target, (long) info.di_uniquifier); if (info.di_attributes & DOOR_LOCAL) printf(", DOOR_LOCAL"); if (info.di_attributes & DOOR_PRIVATE) printf(", DOOR_PRIVATE"); if (info.di_attributes & DOOR_REVOKED) printf(", DOOR_REVOKED"); if (info.di_attributes & DOOR_UNREF) printf(", DOOR_UNREF"); printf("\n"); exit(0);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -