Unix中的信号是什么? [英] What is a signal in Unix?

查看:132
本文介绍了Unix中的信号是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此评论使我感到困惑:"kill -l通常列出所有信号".我以为信号意味着量化的能量.

This comment confuses me: "kill -l generally lists all signals". I thought that a signal means a quantized amount of energy.

[已添加] ,请阐明Unix中的(计算)信号和物理信号.他们是完全不同的概念吗?

[Added] Please, clarify the (computational) signal in Unix and the physical signal. Are they totally different concepts?

[添加] 范式之间是否有主要区别?在C,Python和Haskell等语言中含义是否相同?信号似乎是一个通用术语.

[Added] Are there major differences between paradigms? Is the meaning the same in languages such as C, Python and Haskell? The signal seems to be a general term.

推荐答案

我不敢相信人们没有在比较诸如硬件和软件之类的东西,或者在某些方面不强调 OS 点.

I cannot believe that people are not comparing things such as hardware and software or stressing OS at some points.

信号与中断之间的比较:

不同之处在于 中断发送到操作 系统通过硬件,信号是 由操作员发送到流程 系统或其他过程. 注意 信号与无关 软件中断,仍然 由硬件发送的(CPU本身, 在这种情况下). (源)

The difference is that while interrupts are sent to the operating system by the hardware, signals are sent to the process by the operating system, or by other processes. Note that signals have nothing to do with software interrupts, which are still sent by the hardware (the CPU itself, in this case). (source)

定义

    根据下面的书,
  1. process =正在执行的程序

进一步阅读

  1. 将信号与中断和异常

Tanenbaum的书《现代操作系统》

Tanenbaum's book Modern Operating Systems

这篇关于Unix中的信号是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆