Sample Header Ad - 728x90

How to wait the end of a non-child process?

1 vote
0 answers
113 views
I have here a not really fine app, partially out of my control. Sometimes it stops and I want to restart it, and some extra options. So, if it exists, I want to start my script. Poor man solution would be to check it in a loop, if it runs. I am thinking on a better solution. If it would be a child process, or it would have at least some console-only debug mode, that would be very simple. But it has not. It actually daemonizes itself into a dbus service, and it is doing that as a closed source app... However, fortunately I have a shell environment to deal with it. But I really, really don't like to poll the process if it is still running. So it would be trivial. But I want to *wait for the event that is had exited*. I repeat, I have no control over it, it is a closed source tool, restarting itself as a dbus service. I can find it with a script, and then I could wait its exit, but how? How can I wait for the exit of a non-child process?
Asked by peterh (10459 rep)
Feb 24, 2025, 01:37 PM
Last activity: Feb 24, 2025, 08:23 PM