<<< Previous topic - Next topic >>> |
|
Author |
Message |
Lucky B
Joined: 25 Jul 2006 Posts: 35
|
Posted: 27.02.2007, 12:20 Post subject: Linux aus C Programm neu booten |
|
|
Hallo,
gibt es eine Möglichkeit den Dil/Net per C-Befehl aus neu zu booten?
In der Console ja mit reboot, ich benötige aber einen Neustart aus einem Programm heraus.
Vielleicht weis ja jemand was dazu, Danke.
Gruß
Björn |
|
Back to top |
|
|
dl7bj
Joined: 10 Jul 2006 Posts: 18 Location: Rotenburg, JO43PC
|
Posted: 28.02.2007, 22:57 Post subject: Re: Linux aus C Programm neu booten |
|
|
Hallo Björn,
Lucky B wrote: |
gibt es eine Möglichkeit den Dil/Net per C-Befehl aus neu zu booten?
In der Console ja mit reboot, ich benötige aber einen Neustart aus einem Programm heraus.
|
Rufe doch einfach system auf:
int main(void)
{
system("/sbin/init 6");
}
funktioniert bei mir. reboot oder shutdown mit entsprechenden Parametern sollte
es auch tun.
Gruss,
Thomas |
|
Back to top |
|
|
Lucky B
Joined: 25 Jul 2006 Posts: 35
|
Posted: 01.03.2007, 21:06 Post subject: Re: Linux aus C Programm neu booten |
|
|
Hi Thomas,
Danke für den Tip,
werd ich morgen auf jedenfall mal testen.
[Edit: Danke nochmals funktioniert ohne probleme.]
Gruß Björn |
|
Back to top |
|
|
|