Skip to content

Commit

Permalink
section: zh-cn, fix bad URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Lellansin committed May 24, 2017
1 parent 225a2be commit 92178b3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions sections/zh-cn/event-async.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# 事件/异步

* [`[Basic]` Promise](https://github.com/ElemeFE/node-interview/blob/master/sections/event-async.md#promise)
* [`[Doc]` Events (事件)](https://github.com/ElemeFE/node-interview/blob/master/sections/event-async.md#events)
* [`[Doc]` Timers (定时器)](https://github.com/ElemeFE/node-interview/blob/master/sections/event-async.md#timers)
* [`[Point]` 阻塞/异步](https://github.com/ElemeFE/node-interview/blob/master/sections/event-async.md#阻塞异步)
* [`[Point]` 并行/并发](https://github.com/ElemeFE/node-interview/blob/master/sections/event-async.md#并行并发)
* [`[Basic]` Promise](/sections/zh-cn/event-async.md#promise)
* [`[Doc]` Events (事件)](/sections/zh-cn/event-async.md#events)
* [`[Doc]` Timers (定时器)](/sections/zh-cn/event-async.md#timers)
* [`[Point]` 阻塞/异步](/sections/zh-cn/event-async.md#阻塞异步)
* [`[Point]` 并行/并发](/sections/zh-cn/event-async.md#并行并发)

## 简述

Expand Down
18 changes: 9 additions & 9 deletions sections/zh-cn/io.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# IO

* [`[Doc]` Buffer](https://github.com/ElemeFE/node-interview/blob/master/sections/io.md#buffer)
* [`[Doc]` String Decoder (字符串解码)](https://github.com/ElemeFE/node-interview/blob/master/sections/io.md#string-decoder)
* [`[Doc]` Stream (流)](https://github.com/ElemeFE/node-interview/blob/master/sections/io.md#stream)
* [`[Doc]` Console (控制台)](https://github.com/ElemeFE/node-interview/blob/master/sections/io.md#console)
* [`[Doc]` File System (文件系统)](https://github.com/ElemeFE/node-interview/blob/master/sections/io.md#file)
* [`[Doc]` Readline](https://github.com/ElemeFE/node-interview/blob/master/sections/io.md#readline)
* [`[Doc]` REPL](https://github.com/ElemeFE/node-interview/blob/master/sections/io.md#repl)
* [`[Doc]` Buffer](/sections/zh-cn/io.md#buffer)
* [`[Doc]` String Decoder (字符串解码)](/sections/zh-cn/io.md#string-decoder)
* [`[Doc]` Stream (流)](/sections/zh-cn/io.md#stream)
* [`[Doc]` Console (控制台)](/sections/zh-cn/io.md#console)
* [`[Doc]` File System (文件系统)](/sections/zh-cn/io.md#file)
* [`[Doc]` Readline](/sections/zh-cn/io.md#readline)
* [`[Doc]` REPL](/sections/zh-cn/io.md#repl)

# 简述

Expand Down Expand Up @@ -285,7 +285,7 @@ int printf(FILE *stream, 要打印的内容)
当你使用 ssh 在远程服务器上运行一个命令的时候, 在服务器上的命令输出虽然也是写入到服务器上 shell 的 stdout, 但是这个远程的 shell 是从 sshd 服务上 fork 出来的, 其 stdout 是继承自 sshd 的一个 fd, 这个 fd 其实是个 socket, 所以最终其实是写入到了一个 socket 中, 通过这个 socket 传输你本地的计算机上的 shell 的 stdout.
如果你理解了上述情况, 那么你也就能理解为什么守护进程需要关闭 stdio, 如果切到后台的守护进程没有关闭 stdio 的话, 那么你在用 shell 操作的过程中, 屏幕上会莫名其妙的多出来一些输出. 此处对应[守护进程](https://github.com/ElemeFE/node-interview/blob/master/sections/process.md#守护进程)的 C 实现中的这一段:
如果你理解了上述情况, 那么你也就能理解为什么守护进程需要关闭 stdio, 如果切到后台的守护进程没有关闭 stdio 的话, 那么你在用 shell 操作的过程中, 屏幕上会莫名其妙的多出来一些输出. 此处对应[守护进程](/sections/zh-cn/process.md#守护进程)的 C 实现中的这一段:
```c
for (; i < getdtablesize(); ++i) {
Expand All @@ -301,7 +301,7 @@ console.log(process.stdout.fd); // 1
console.log(process.stderr.fd); // 2
```

在上一节中的 [在 IPC 通道建立之前, 父进程与子进程是怎么通信的? 如果没有通信, 那 IPC 是怎么建立的?](https://github.com/ElemeFE/node-interview/blob/master/sections/process.md#q-child) 中使用环境变量传递 fd 的方法, 这么看起来就很直白了, 因为传递 fd 其实是直接传递了一个整型数字.
在上一节中的 [在 IPC 通道建立之前, 父进程与子进程是怎么通信的? 如果没有通信, 那 IPC 是怎么建立的?](/sections/zh-cn/process.md#q-child) 中使用环境变量传递 fd 的方法, 这么看起来就很直白了, 因为传递 fd 其实是直接传递了一个整型数字.

### 如何同步的获取用户的输入?

Expand Down
10 changes: 5 additions & 5 deletions sections/zh-cn/js-basic.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Javascript 基础问题

* [`[Basic]` 类型判断](https://github.com/ElemeFE/node-interview/blob/master/sections/js-basic.md#类型判断)
* [`[Basic]` 作用域](https://github.com/ElemeFE/node-interview/blob/master/sections/js-basic.md#作用域)
* [`[Basic]` 引用传递](https://github.com/ElemeFE/node-interview/blob/master/sections/js-basic.md#引用传递)
* [`[Basic]` 内存释放](https://github.com/ElemeFE/node-interview/blob/master/sections/js-basic.md#内存释放)
* [`[Basic]` ES6 新特性](https://github.com/ElemeFE/node-interview/blob/master/sections/js-basic.md#es6-新特性)
* [`[Basic]` 类型判断](/sections/zh-cn/js-basic.md#类型判断)
* [`[Basic]` 作用域](/sections/zh-cn/js-basic.md#作用域)
* [`[Basic]` 引用传递](/sections/zh-cn/js-basic.md#引用传递)
* [`[Basic]` 内存释放](/sections/zh-cn/js-basic.md#内存释放)
* [`[Basic]` ES6 新特性](/sections/zh-cn/js-basic.md#es6-新特性)


## 简述
Expand Down
2 changes: 1 addition & 1 deletion sections/zh-cn/os.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $ ps -x
23733 ? Ssl 2:53 PM2 v1.1.2: God Daemon
```

其中为 `?` 的是没有依赖 TTY 的进程, 即[守护进程](https://github.com/ElemeFE/node-interview/blob/master/sections/process.md#%E5%AE%88%E6%8A%A4%E8%BF%9B%E7%A8%8B).
其中为 `?` 的是没有依赖 TTY 的进程, 即[守护进程](/sections/zh-cn/process.md#%E5%AE%88%E6%8A%A4%E8%BF%9B%E7%A8%8B).

在 Node.js 中你可以通过 stdio 的 isTTY 来判断当前进程是否处于 TTY (如终端) 的环境.

Expand Down

0 comments on commit 92178b3

Please sign in to comment.