>我在Linux CentOS中执行了以下C代码来创建进程。
#include <stdio.h>
#include <unistd.h>
int main ()
{
int i = 0;
while ( 1 )
{
printf ( "nhello %dn", i ++ );
sleep ( 2 );
}
}
我已将其编译为hello_count
.当我做./hello_count
时,输出是这样的:
hello 0
hello 1
hello 2
...
直到我杀了它。我已使用以下命令停止执行
kill -s SIGSTOP 2956
当我这样做时
ps -e
进程2956 ./hello_count
仍列出。
是否有任何命令或任何方法来恢复(不重新启动(进程 ID 为 2956 的进程?
另外,当我停止进程时,命令行显示:
[1]+ Stopped ./hello_count
上行中的[1]+
是什么意思?
- 要继续停止的进程,即恢复使用杀死 -SIGCONT PID
- Regd [1]+ 这是处理作业的 bash 方式。有关更多信息,请尝试从 bash 提示符帮助作业。