⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wrapup.c

📁 unix v7是最后一个广泛发布的研究型UNIX版本
💻 C
字号:
#include "signal.h"#include "stdio.h"#include "lrnref"wrapup(n)int n;{	/* this routine does not use 'system' because it wants	 interrupts turned off */	int retval, pid, pidw;	signal(SIGINT, SIG_IGN);	chdir("..");	if ( (pid=fork()) ==0) {		signal(SIGHUP, SIG_IGN);		execl("/bin/rm", "rm", "-r", dir, 0);		execl("/usr/bin/rm", "rm", "-r", dir, 0);		fprintf(stderr, "Can't find 'rm' command.\n");		exit(0);	}	printf("Bye.\n"); /* not only does this reassure user but 			it stalls for time while deleting directory */	fflush(stdout);	/* printf("Wantd %d got %d val %d\n",pid, pidw, retval); */	exit(n);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -