cap*_*cha 7 process gnu-screen
我注意到,在运行screen用它标识的进程时,它实际上以大写形式显示。
Linux Debian Wheezy。
这里有一个例子,我通过 ssh 进入一台机器,运行screen -S test然后top在那里运行。
me@host:~$ ps x
PID TTY STAT TIME COMMAND
4177 ? S 0:00 sshd: me@pts/0
4178 pts/0 Ss 0:00 -bash
4260 ? Ss 0:00 SCREEN -S test
4261 pts/1 Ss 0:00 /bin/bash
4813 pts/1 S+ 0:00 top
5891 pts/0 R+ 0:00 ps x
me@host:~$
Run Code Online (Sandbox Code Playgroud)
这种大写有什么原因吗?我想我在首都还没有见过像这样的其他节目。
Screen 以小写二进制形式存在于文件系统中:
me@host:~$ which screen
/usr/bin/screen
me@host:~$ l /usr/bin/screen
-rwxr-sr-x 1 root utmp 402K Sep 4 05:07 /usr/bin/screen
me@host:~$ file /usr/bin/screen
/usr/bin/screen: setgid ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0x035fa489e79088829da70a87252e4da70fc4a6bf, stripped
me@host:~$
Run Code Online (Sandbox Code Playgroud)
如果这是可接受的行为或者可能是我不知道的新趋势?
开发人员选择这样做是为了简化杀死杂散screen进程的过程。参考源存储库:版本 2.3( 1991 年 2 月 25 日)和 3.1(1991 年 9 月 9 日)之间进行了更改,其中包括来自CHANGES的以下评论:
when the socket has been removed, send a SIGCHLD to the poor SCREEN
process and it will try to recover. then try a 'screen -r' again.
all the socket stuff lives now in an extra file.
Run Code Online (Sandbox Code Playgroud)
以及自述文件:
screen -list
screen -ls
Show all available sockets. If there are (DEAD???) sockets, you may consider
removing them. If there are sockets missing, you may send a SIGCHLD to its
process 'SCREEN' and the process will re-establish the socket. (think of
someone cleaning /tmp thoroughly).
Run Code Online (Sandbox Code Playgroud)
如果他们没有如此彻底地更改名称,则存在用户发出错误流程信号的风险。