Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 09-19-2005, 02:34 PM   #1
Senior Member
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,197

Rep: Reputation: 45
Daemon Processhas already been asked (and possibly answered).

Hi i am trying to create a daemon process

if (pid<0){
printf("Error creating child process ");
if (pid >0){
if (sid<0){
perror("Problem with the child process");

What i know is that i have to fork for a new process ... The new process that now runs in to background.. I also know that the daemon code should be inside a while statement so as to run continiously
//do your job

I want to know if this code will consume all the cpu or not
Old 09-19-2005, 05:24 PM   #2
Registered: Feb 2005
Location: Sunnyvale, CA
Distribution: Ubuntu
Posts: 205

Rep: Reputation: 38

No, it will behave like any other process and go through the scheduler.


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
DVD Shrink - Been asked, but never answered knappster Linux - Software 95 09-19-2005 12:11 AM
this wine question was asked in '03 but never fully answered... breezewax Linux - Software 3 09-24-2004 08:33 AM
Probably been answered, BUT........ phatbastard Slackware 2 09-08-2004 09:05 PM
Very Frequently Asked/Answered Questions ppuru LQ Suggestions & Feedback 7 07-30-2004 01:32 AM
Mark threads as answered jeremy LQ Suggestions & Feedback 6 12-28-2002 05:46 PM > Forums > Non-*NIX Forums > Programming

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

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