当前位置: 技术问答>linux和unix
linux下ctrl+d是啥意思?
来源: 互联网 发布时间:2016-05-13
本文导语: 当系统启动后,我按ctrl+d,然后我起的一些进程死掉了,串口打印dnsmasq也被信号中断,中断的信号是SIGHUP 我查询ctrl+d有退出shell的意思, ctl+c:发送信号SIGINT(程序中止) ctl+d:发送信号SIGTSTP(进程中止) 这个CTRL+d 到底...
当系统启动后,我按ctrl+d,然后我起的一些进程死掉了,串口打印dnsmasq也被信号中断,中断的信号是SIGHUP
我查询ctrl+d有退出shell的意思,
ctl+c:发送信号SIGINT(程序中止)
ctl+d:发送信号SIGTSTP(进程中止)
这个CTRL+d 到底是什么意思,是发送信号SIGTSTP或者SIGHUP,还是退出shell?
我不希望CTRL+d 杀死某些进程如何操作
我查询ctrl+d有退出shell的意思,
ctl+c:发送信号SIGINT(程序中止)
ctl+d:发送信号SIGTSTP(进程中止)
这个CTRL+d 到底是什么意思,是发送信号SIGTSTP或者SIGHUP,还是退出shell?
我不希望CTRL+d 杀死某些进程如何操作
|
对信号函数的从写来实现
setjmp 与 longjmp
|
SIGTSTP
This interactive stop signal is generated by the terminal driver when we type the terminal suspend key (often Control-Z). This signal is sent to all processes in the foreground process group.
Unfortunately, the term stop has different meanings. When discussing job control and signals, we talk about stopping and continuing jobs. The terminal driver, however, has historically used the term stop to refer to stopping and starting the terminal output using the Control-S and Control-Q characters. Therefore, the terminal driver calls the character that generates the interactive stop signal the suspend character, not the stop character.
This interactive stop signal is generated by the terminal driver when we type the terminal suspend key (often Control-Z). This signal is sent to all processes in the foreground process group.
Unfortunately, the term stop has different meanings. When discussing job control and signals, we talk about stopping and continuing jobs. The terminal driver, however, has historically used the term stop to refer to stopping and starting the terminal output using the Control-S and Control-Q characters. Therefore, the terminal driver calls the character that generates the interactive stop signal the suspend character, not the stop character.
|
Ctrl+D 发送EOF(end-of-file)
Ctrl+Z 才是SIGTSTP
|
Ctrl+z产生SIGTSTP
ctrl+c产生SIGINT
|
学习了
|
SIGHUP 该信号是说明 该进程组从终端脱离,而被杀死.