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

📄 suspend.c

📁 linux网络编程实例程序 socket程序 适合初学者。
💻 C
字号:
/* suspend.c - */#include <sys/types.h>#include <sys/signal.h>#include <stdio.h>#include <string.h>#include "local.h"extern struct termios	tntty;/*------------------------------------------------------------------------ * suspend - suspend execution temporarily *------------------------------------------------------------------------ */intsuspend(FILE *sfp, FILE *tfp, int c){	if (tcgetattr(0, &tntty) < 0)	/* save current tty state	*/		errexit("can't get tty modes: %s\n", strerror(errno));	if (tcsetattr(0, TCSADRAIN, &oldtty) < 0) /* restore old state	*/		errexit("can't set tty modes: %s\n", strerror(errno));	(void) kill(0, SIGTSTP);	if (tcgetattr(0, &oldtty) < 0)	/* may have changed		*/		errexit("can't get tty modes: %s\n", strerror(errno));	if (tcsetattr(0, TCSADRAIN, &tntty) < 0) /* back to telne modes*/		errexit("can't set tty modes: %s\n", strerror(errno));	return 0;}

⌨️ 快捷键说明

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