通过命令行恢复已停止的进程

我在Linux CentOS中执行了下面的C代码来创build一个进程

#include <stdio.h> #include <unistd.h> int main () { int i = 0; while ( 1 ) { printf ( "\nhello %d\n", i ++ ); sleep ( 2 ); } } 

我已经编译成hello_count 。 当我做./hello_count ,输出是这样的:

 hello 0 hello 1 hello 2 ... 

直到我杀了它。 我已经停止执行使用以下命令

 kill -s SIGSTOP 2956 

当我做

 ps -e 

进程2956 ./hello_count仍在列表中。

是否有任何命令或任何方法来恢复(不重新启动)进程号为2956的进程?

另外,当我停止进程时,命令行显示:

 [1]+ Stopped ./hello_count 

上面这行中的[1]+是什么意思?

  • 要继续停止的进程,那就是继续使用kill -SIGCONT PID
  • Regd [1] +这是处理工作的方式。 有关更多信息,请尝试从bash提示帮助作业