进程被debug时的状态

在mac/bsd和linux上ps展示进程状态的字符与linux可能含义不同,比如我的java进程在mac上ps看到是"TX+"状态

➜  ps aux | grep "[j]ava"
hongjiang  60387  0.0  0.4  6072548  36516 s001  TX+  7:28PM  0:00.19 java Daemon

Linux上man ps看到 X 表示 "dead (should never be seen)", 而Mac/BSD下则是 “The process is being traced or debugged” 的含义。 Linux上当一个进程被debug中,状态跟stopped一样都使用T表示(在某些高版本linux内核里会区分开,使用小写t表示进程是被debugger跟踪)

Leave a Reply

Your email address will not be published. Required fields are marked *