开发者

Disable DSUSP - Terminal Control

Firstly, what is DSUSP?

I'm trying to 开发者_StackOverflow社区disable it using the following code line:

tntty.c_cc[VDSUSP] = _POSIX_VDISABLE;  

But I get the error that "VDSUSP is undeclared"


The Linux termios(3) man page describes it thus (emphasis mine):

VDSUSP (not in POSIX; not supported under Linux; 031, EM, Ctrl-Y) Delayed suspend character: send SIGTSTP signal when the character is read by the user program. Recognized when IEXTEN and ISIG are set, and the system supports job control, and then not passed as input.

As this isn't a POSIX-specified index, you should test for its presence and only attempt to disable it on platforms where it is defined:

#ifdef VDSUSP
tntty.c_cc[VDSUSP] = _POSIX_VDISABLE;  
#endif
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜