LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-08-2011, 11:54 AM   #1
drb
LQ Newbie
 
Registered: May 2011
Posts: 14

Rep: Reputation: Disabled
Question Problem with reboot(LINUX_REBOOT_CMD_RESTART)


I am running an embedded Linux Release 2.4.19-uc0.

I have code in several places that calls

reboot(LINUX_REBOOT_CMD_RESTART)

successfully. I need to put it into a new place in a application running on the system. When I do, it seems to just lock up the system and does not return from the call nor leave me able to Telnet in or Ping or anything. I've tried puttingtrace code in to write info out to a file, but that too is not working (as it never returns from the reboot() call.

To be clear, I don't get any error from reboot(), it just does not return and does not appear to restart the system.

Any ideas?

Thanks,

drb
 
Old 07-08-2011, 12:40 PM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,505

Rep: Reputation: 2890Reputation: 2890Reputation: 2890Reputation: 2890Reputation: 2890Reputation: 2890Reputation: 2890Reputation: 2890Reputation: 2890Reputation: 2890Reputation: 2890
Any clues on the language?

I ask as the following 2 lines don't seem to imply the same thing:
Quote:
I have code in several places that calls

I need to put it into a new place in a application running on the system
Code in several places within a program / script / application?

If in a different application, why would it suddenly work??
 
Old 07-08-2011, 02:13 PM   #3
drb
LQ Newbie
 
Registered: May 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Good questions.

C in all places. I have the code working in the HTTPD. I have it working in a "Shutdown.c" which results in a command that can be issued via the sash (that is used with Telnet?). It is also working in the floppy controller code Flopset.c.

the new code uses exact same call that works in all these other places. I would understand if it gave me an error as described in the man page (EFAULT EINVAL or EPERM) but it does not return so I assume it is trying to work but hangs on something? As I said, the system is then inaccessible to make any determination of the state it is left in.

Thanks for your interest and help,

drb
 
Old 07-08-2011, 02:48 PM   #4
drb
LQ Newbie
 
Registered: May 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Slight revision of detail?

Apparently, I can still Ping the unit. Just can't Telnet to see anything useful about what is going on. So not completely locked up I guess, but not sure how to figure what state it is in?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FC4 hangs after reboot. Is it possible to manually reboot to find problem hathmann Fedora 5 08-13-2006 03:57 AM
reboot problem jonfa Linux - Hardware 1 06-25-2005 02:14 PM
Problem--- reboot eross Linux - Security 7 08-13-2004 11:15 PM
Reboot Problem Longgroin Slackware 8 08-01-2003 12:17 AM
reboot problem Orion224 Linux - Hardware 6 06-17-2002 03:26 AM


All times are GMT -5. The time now is 07:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration