Skip to content

Commit

Permalink
to update
Browse files Browse the repository at this point in the history
  • Loading branch information
foxxnuaa committed Jun 18, 2019
1 parent 77bd0dd commit eec1893
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions eBook/chapter8/08.14.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#**处理`Unix`信号**

`Go`为程序员提供了`os/signal`包来处理信号。本节将向你显示如何处理`Unix`信号。

首先,让我们介绍`Unix`信号的一些有用信息。你是否使用`Ctrl+C`停止正在运行的程序?如果是,则它们已经比较相似,因为`Ctrl+C`向程序发送`SIGINT signal`。严格来讲,`Unix`信号是可以通过名称或数字访问的软件中断,它们提供了在`Unix`系统上处理异步事件的方法。有两种方式发送信号:通过名字或者通过数字。通常来说,通过名字发送信号比较安全,因为你不太可能不小心发出错误的信号。
Expand All @@ -13,3 +14,5 @@
```shell
$ kill 1210
-bash: kill: (1210) - Operation not permitted

```

0 comments on commit eec1893

Please sign in to comment.