#1 2006-07-03 03:44

ulfreak
Member
Registered: 2006-07-03
Posts: 3

Reboot on process stop

The use I make of shutter is monitoring for a crash/stop of a particular process.
It works, but each time the machine is actually rebooted automatically by shutter, it won't retain the name of the process to monitor, so that if i have the option to automatically trigger event on startup of shutter, it will keep rwebooting the machine since it keep monitoring for process stop, but without any process defined for it to monitor. So I wonder if there is anyway to have the process name to monitor be given to shutter in its .ini file? Or whatever other way around...

Thanks for help! great job btw.

Offline

#2 2006-07-03 16:13

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,374

Re: Reboot on process stop

This is kinda impossible to remember the process that is been watched! Because what you see on that list is not all information that is required to watch a process. In fact, nothing that you see on that dropdown list (aka process name) is required to watch that process. There is such thing called Process ID (PID) which is unique number and assigned by Operating System when process is started, and every time you start the same program - it will get a different PID. Each item in that dropdown list is associated with PID, and that PID is what Shutter needs in order to watch it. It is made that way for a reason, so even when you have 2 (or more) programs running with the same name, Shutter will still watch the one that you have selected, not all that match the process name.

Here is the conclusion: you can't (absolutely no way) know what PID will a program get once started. You would be better using the "Window Closes" event, since it only needs title (or masked title) to watch a particular window. 99% of all user-related processes will have a window (maybe hidden window) with some sort of a title, I would recommend you using window title instead of a process name/id...

Offline

#3 2006-07-03 16:43

ulfreak
Member
Registered: 2006-07-03
Posts: 3

Re: Reboot on process stop

Ok, thanks for reply.

I understand the whole PID situation, but given the fact that only one process with that name is running on the machine, is there any possibility to grab the correct PID based on the process name, and then use it to know what PID that shutter should monitor? Cause i hardly see how I could use the window close event, since when the process monitored stops responding or crashes, the window doesn't close.. it just hangs

Offline

#4 2006-07-03 17:13

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,374

Re: Reboot on process stop

ulfreak wrote:

Cause i hardly see how I could use the window close event, since when the process monitored stops responding or crashes, the window doesn't close.. it just hangs

Well, if the process hangs and doesn't terminate - it will not trigger "Process Stops" event. Did Shutter actually trigger an event while that process was still running? This is very strange... or am I missing something? If process is still running (even tho it hangs), why would "Process Stops" event work and "Window Closes" not work?

Offline

#5 2006-07-03 18:07

ulfreak
Member
Registered: 2006-07-03
Posts: 3

Re: Reboot on process stop

Trust me, it really does trigger, cause apparently shutter sees the same as process manager does, that is:" Not responding " state, so I guess it assumes it is stopped.

Offline

#6 2006-07-05 14:10

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,374

Re: Reboot on process stop

But did you try the "Window Closes" event?
Maybe it will assume that the window was also closed wink

Offline

Board footer

Powered by FluxBB