Forum > General

How to restart the own application ?

(1/1)

Mangafreak1995:
Hey Guys,

I'm searching for a method the restart my application under linux (currently ubuntu 10.04).
Googling('lazarus application restart') returns two different ways but both interrupt my app, which should restart.
How can I realize it ?

Greetings, Mangafreak

Bart:
What do you mean with "interrupt my app, which should restart"?

Restarting for me means: shutdown, then launch again. This will by definition interrupt the app  8)

I can think of at least 2 approaches.

You can use TProcess to lauch another instance of your program and immediately after that close the first instance.

You can use a launcher program that executes the app (much like startlazarus), then restarts it after shutdown.
A simple shell script should suffice (let the app terminate with an exitcode you can evaluate in the script)

Bart

Navigation

[0] Message Index

Go to full version