TTY在unix ps命令中的含义是什么? [英] What does TTY mean in the unix ps command?

查看:247
本文介绍了TTY在unix ps命令中的含义是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行PS时,其中一列输出为TTY。这是什么意思?特别是,作为??的价值如何与ttys000比较?

When I run PS one of the columns output is TTY. What does this mean? In particular, how does as value of "??" compare with "ttys000"?

我问,因为我有一个Java程序通过ProcessBuilder执行 sort ,当这个程序通过我的IDE(IntelliJ)运行,该过程比在IDE外部作为可执行jar运行时少5倍。

I ask because I have a Java program execute sort via ProcessBuilder, and when this program is run via my IDE (IntelliJ) the process takes 5x less than when run as an executable jar outside the IDE.

在每种情况下,我都会在排序运行时运行ps,唯一的区别是IDE会创建一个TTY为??的进程。而jar创建一个TTY为ttys000的进程。

In each case I run ps when the sort is running and the only difference is the IDE creats a process with a TTY of ?? whereas the jar creates a process with TTY of ttys000.

推荐答案

TTY 是一个计算机终端。在 ps 的上下文中,它是执行特定命令的终端。

A TTY is a computer terminal. In the context of ps, it is the terminal that executed a particular command.

缩写代表TeleTYpewriter ,这是允许用户连接到早期计算机的设备。

The abbreviation stands for "TeleTYpewriter", which were devices that allowed users to connect to early computers.

根据您的情况,jar会创建一个名为ttys000的虚拟终端,但IDE不会附加到虚拟终端以执行命令。

In relation to your situation, the jar creates a virtual terminal named 'ttys000' but the IDE does not attach to a virtual terminal to execute the command.

这篇关于TTY在unix ps命令中的含义是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆