Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ Linux Ubuntu
I created a daemon for my linux OS using C++ and used init.d script for running the daemon. It works but when I list the processes using "ps -aux" command it showing like this.
root 1126 1.9 0.2 66580 4024 ? Ss Feb28 29:06 /sbin/mydaemon --options args

I didn't understand why this --options args. How I can remove this from my daemon, I am not using any options or arguments to my daemon.
Posted 28-Feb-13 19:14pm
Comments
Jochen Arndt at 1-Mar-13 2:47am
   
The additional command line arguments are probably passed by your script. So check your script. It seems that you used a script template and forgot to comment or change some varaiables.
Arun Kumar K S at 1-Mar-13 3:18am
   
Thanks.........., You are right I forgot to change DAEMON_ARGS="--options args"
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
$DAEMON_ARGS \
from my ubuntu systems init.d script. Please put it as your answer I will accept your answer
GiZmoDragonBack at 21-Jul-13 15:59pm
   
Can you add the script to have it as example?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.1411022.1 | Last Updated 1 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100