日期:2014-05-16  浏览次数:20819 次

ps 打印信息疑问
我这边让一个程序 如下命令运行 :./lll & sleep 1

通过 ps 命令查看的话,显示 有此进程
  在进程名中 ,显示 ./lll & sleep 1

但是在后面我感觉 此进程出了问题,退出了,再查看ps
 打印的显示 是: 【./lll】

不清楚为什么 后面 进程名中多了一个中括号?
那位能帮我解释下。
 

------解决方案--------------------
你应该把你完整的情况贴出来
你的描述有点不清楚
------解决方案--------------------
内核进程或者不确定的进程

man ps得到一下结果

With the -o flag, the ps command examines memory or the paging area and determines what the command name and parameters were when the process was created. If the ps command cannot find this information, the command name stored in the kernel is displayed in square brackets.
大概就是系统找不到相关进程信息了
------解决方案--------------------
你应该把你完整的情况贴出来
你的描述有点不清楚
------解决方案--------------------
探讨

内核进程或者不确定的进程

man ps得到一下结果

With the -o flag, the ps command examines memory or the paging area and determines what the command name and parameters were when the process was created. If the ps co……

------解决方案--------------------
看样子是你的代码本身的问题 要解决问题 就得从你代码入手
老逮着进程这里的显示信息 是解决不了问题的。
------解决方案--------------------
man ps里的信息对你是一种指示
------解决方案--------------------
我的10楼怎么又没了??
关注。。。。
------解决方案--------------------
lz的代码是不是产生了僵尸进程??