Y
Y
yurasek2015-12-25 15:18:23
linux
yurasek, 2015-12-25 15:18:23

What is the most correct way to restart Linux from within your program?

In Lazarus, I use this code:
FpKill(1, SIGINT);
My program runs with system privileges, reloading looks correct on the outside.
Am I doing everything right?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Gasoid, 2015-12-25
@Gasoid

and can run a standard command?
reboot

A
aelcfx, 2016-01-05
@aelcfx

You can send a signal to init and the system will automatically reboot. However, using standard tools (shutdown, reboot) it is easier to do this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question