• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/corennnnn


Commit MetaInfo

修订版5673ac08ba5b3e5db97568a4614bfca59119447d (tree)
时间2011-08-04 17:31:46
作者Jim Huang <jserv@0xla...>
CommiterChih-Wei Huang

Log Message

Let console applications have a controlling tty.

Since the logic in open_console() is changed, terminating console
application within a shell is now possible via Ctrl-C.

更改概述

差异

--- a/init/init.c
+++ b/init/init.c
@@ -121,6 +121,8 @@ static void open_console()
121121 int fd;
122122 if ((fd = open(console_name, O_RDWR)) < 0) {
123123 fd = open("/dev/null", O_RDWR);
124+ } else {
125+ ioctl(fd, TIOCSCTTY, 0);
124126 }
125127 dup2(fd, 0);
126128 dup2(fd, 1);