gpt4 book ai didi

我可以将 SIGCONT 发送到正在运行的进程吗?

转载 作者:IT王子 更新时间:2023-10-29 00:48:38 28 4
gpt4 key购买 nike

我知道 SIGCONT 继续之前被 SIGSTOP 停止的进程。我可以在没有 SIGSTOP 的情况下多次使用 SIGCONT 吗?即,以下顺序是否有效?

SIGSTOP to process A : The process stops
SIGCONT to process A : Process resumes
SIGCONT to process A : Process already runs - this SIGCONT has no effect
SIGCONT to process A : Process already runs - this SIGCONT has no effect
...
SIGSTOP to process A : The process stops
SIGCONT to process A : Process resumes

最佳答案

你可以的。 TLPI 说:

When sent to a stopped process, this signal causes the process to resume (i.e., to be rescheduled to run at some later time). When received by a process that is not currently stopped, this signal is ignored by default. A process may catch this signal, so that it carries out some action when it resumes.

APUE:

Note that the default action for SIGCONT is to continue the process, if it is stopped; otherwise, the signal is ignored.

关于我可以将 SIGCONT 发送到正在运行的进程吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12036090/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com