On 1/21/19 10:17 AM, Marc Roos wrote:
> I have had a process stuck in D+ state, and need to run it still a few
> times. If I use timeout, will it prevent this process being stuck in D+
> state until a reboot?
Basically, timeout is sending a signal to the process it has started
after the TIMEOUT time has passed. The default signal is SIGTERM,
but you can pass any other signal number instead.
The point is: if your process doesn't react on receiving a SIGNAL with
a regular 'kill -SIGNAL PID', then there's nothing more timeout could do
about it.
Regarding state 'D+':
$ man ps | grep ' D '
D uninterruptible sleep (usually IO)
So no, that process seems to be stuck in an IO operation.
You may find out with e.g. 'strace -vp PID' and 'lsof -p PID'
what that process is doing.
More on 'D':
- https://support.microfocus.com/kb/doc.php?id=7002725
- https://stackoverflow.com/questions/223644/what-is-an-uninterruptable-process
- use your search engine of choice.
Have a nice day,
Berny