D
D
DragoN DragoN2017-02-27 13:31:19
linux
DragoN DragoN, 2017-02-27 13:31:19

How to terminate a command in exec() by timer?

How to terminate a process that is hung or considered to be time-hung by exec(). Or perhaps there is a command that will calculate the time and if it exceeds the value for example 10 seconds, force it to end, please tell me

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Nikolaev, 2017-02-27
@gromdron

I see several options:

  1. Develop a script in such a way that it does not have to be terminated in such a draconian way
  2. Make a fallback script. Those. you can send the script the start date and check when it becomes more - disable
  3. A third party script that will monitor running scripts and kill

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question