I got a simple run-until-terminated service.
At the end of it, once all threads are started, it has something like input('Press something to terminate the program.')
. Now I want it to be called with few other services in a single chain like python myservice.py && python myanotherservice.py
. Because of input(...)
it waits for user to reply at the time python service.py
is executed. Is there a way to redirect stdin
to some special place that can never be read? Or what's the better way?
P.S. Yeah, I use Python, input
method. Yet it shouldn't matter.
P.S.S. I don't care about termination remotely: service gonna die with entire VPS, so it's fine to be unable to terminate it once started.