TOP
SSV Software Systems Register  Register
Log in to check your private messages  Log in to check your private messages
Startseite FAQ Search Mitglieder Profile  Log in 
SSV Support-Forum
Linux aus C Programm neu booten

 
Post new topic   Reply to topic    SSV-Forum Forum Index >>> DNP/9200
<<< Previous topic - Next topic >>>  
Display posts from previous:   
Author Message
Lucky B



Joined: 25 Jul 2006
Posts: 35

PostPosted: 27.02.2007, 12:20    Post subject: Linux aus C Programm neu booten Reply with quote

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
View user's profile Send private message
dl7bj



Joined: 10 Jul 2006
Posts: 18
Location: Rotenburg, JO43PC

PostPosted: 28.02.2007, 22:57    Post subject: Re: Linux aus C Programm neu booten Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Lucky B



Joined: 25 Jul 2006
Posts: 35

PostPosted: 01.03.2007, 21:06    Post subject: Re: Linux aus C Programm neu booten Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SSV-Forum Forum Index >>> DNP/9200 All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

SSV Software Systems GmbH

Dünenweg 5
30419 Hannover

Fon: +49(0)511  ·  40 000-0
Fax: +49(0)511  ·  40 000-40

sales@ssv-embedded.de


Impressum    ·    Datenschutz    ·    AGB

© 2023 SSV SOFTWARE SYSTEMS GmbH. Alle Rechte vorbehalten.

ISO 9001:2015