LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 04-19-2001, 07:33 AM   #1
Sharmila Inamdar
LQ Newbie
 
Registered: Apr 2001
Posts: 6

Rep: Reputation: 0
Post


Hi,

I have an application program of 34K size. I wanted the prog to get loaded after normal boot-up and keep running in background mode.

I am using redhat 6.2,kernel 2.2.14 at runlevel 3. So I appended the command with full pathname for background running in /etc/rc.d/rc.local.

At boot-time what I see is part of the prog gets executed before login and then there is no trace or further execution. ps -aux simply doesn't show the prog. It is being terminated.

Is it a memory problem?

I've similar program of 17k size (but nothing to do with files) which works well as expected.
So , is it got something to do with file operations?

pls help.

..sharmila
 
Old 04-19-2001, 07:38 PM   #2
crabboy
Moderator
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
It sounds like your process is either not starting or dying after startup. What happens when you start the process in the backgroud as root on the command line?

Remember the following when coding daemons:[list=1][*] fork and exit parent[*] setsid() ( become session leader )[*] chidr("/") ( change dir to root )[*] umask(0) ( clear file mode mask )[/list=1]
 
Old 04-20-2001, 12:14 AM   #3
Sharmila Inamdar
LQ Newbie
 
Registered: Apr 2001
Posts: 6

Original Poster
Rep: Reputation: 0
Automatic Program loading at boot-up

At command prompt the program works perfectly well in background mode.i.e my_program &

But if excuted from rc.local , it starts execution ,prints few messages which are part of the program. One more observation I would like to share is, it stops execution at the end of return of a function call. This function is defined as extern to the calling program. The program is in C.

Secondly, I've not really used any fork,setsid sequence. Can you pls. suggest me some reference to get basic ideas of these daemon concepts?


Thanks a lot

..sharmila
 
  


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
Automatic loading of firewire modules and devices Ilici Linux - Software 1 04-09-2005 07:26 AM
Automatic module loading... how? odiseo77 Linux - Networking 8 02-07-2005 08:26 PM
Stopping Automatic Loading luigidrummer Linux - Software 1 08-27-2004 10:04 AM
Where is the automatic module loading scripts at system Boot? captainstorm Linux - Software 1 07-02-2004 08:17 PM
Problem with automatic module loading Fonk Red Hat 1 05-24-2004 11:22 AM


All times are GMT -5. The time now is 05:27 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration