📄 showmount.c
字号:
#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <time.h>#include <signal.h>showmount(char *host){time_t timev, timecheck;pid_t pid;time(&timev);pid = fork();if (pid != 0) { wait(); kill(pid, SIGINT); return; }if(pid == 0){ execl("/usr/sbin/showmount", "showmount", "-e", host, NULL); while(1) { time(&timecheck); if (timecheck == (timev + 4)) { kill(pid, SIGALRM); return; } }}}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -