简体   繁体   中英

Why does emacs escape getty?

I create two virtual serials by

socat -d -d pty,raw,echo=0 pty,raw,echo=0

in the specific case, I got /dev/pts/9 and /dev/pts/16 I then start screen on one side, in one X terminal, specifically gnome-terminal

 screen /dev/pts/9 9600 vt52

and getty on the other side (from root), in another X terminal (again, gnome-terminal)

getty pts/16 9600 vt52

I then login in the screen terminal, I can ls etc. However, when I launch emacs (inside screen, so it's text version, not the X one) I get emacs's output on the getty's X terminal, instead of inside screen's X terminal. How is that possible? How can I fix that?

I do not know if that's related, but when I login I get

-bash: cannot set terminal process group (64718): Inappropriate ioctl for device
-bash: no job control in this shell

The answer was provided by Andres Navarro ( https://github.com/AndresNavarro82 ). It is necessary to use setsid, ie

sudo setsid getty pts/16 9600 vt52

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM