You are not logged in.

#1 2013-01-20 16:08:53

oldtimeyjunk
Member
From: /world/europe/uk/england
Registered: 2011-04-30
Posts: 202
Website

Automactially restart crashed app?

So, basically Docky (a dock, did you guess?(!)) has a current issue where it will randomly close when idle. It's been on it's bugfix list for a while, but, so far, no fix.

Is there any way I could write a script that would loop to detect if the program has closed, and re-launch it when it does?


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed." - Unix for Dummies, 2nd Edition

Offline

#2 2013-01-20 16:17:15

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,554
Website

Re: Automactially restart crashed app?

while :; do docky; done

You can make this more elaborate by checking the exit code and only looping if it exited with an error - but it's the same idea.

Last edited by Trilby (2013-01-20 16:18:06)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB