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

📄 sleep1.c

📁 understanding unix/linux programming source code(bruce molay)
💻 C
字号:
/* sleep1.c *	purpose	show how sleep works *	usage	sleep1 *	outline	sets handler, sets alarm, pauses, then returns */#include	<stdio.h>#include	<signal.h>// #define	SHHHHmain(){	void	wakeup(int);	printf("about to sleep for 4 seconds\n");	signal(SIGALRM, wakeup);		/* catch it	*/	alarm(4);				/* set clock	*/	pause();				/* freeze here	*/	printf("Morning so soon?\n");		/* back to work	*/}void wakeup(int signum){#ifndef SHHHH	printf("Alarm received from kernel\n");#endif}

⌨️ 快捷键说明

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