[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: SOLVED: Daemon Programming



Marc, thanks that was the problem !!!

sprintf(message, "say -s 4 -a \"%s\"", buffer);  < this was the big
big big mistake

I added the hole path to the instructions:

sprintf(message, "/usr/local/bin/say -s 4 -a \"%s\"", buffer);

Thanks to all of you who helped me !!  :-)

Sincerely,
Sergio Cuéllar Valdés


On Thu, 13 Jan 2005 21:31:33 -0600, Sergio Cuéllar Valdés
<herrsergio@gmail.com> wrote:
> Yes Marc !! I use  the system() instruction !!  But how can I avoid
> using this instruction ?
> In line 153 (http://rafb.net/paste/results/vkgCRD46.html) is where is
> use system(), Maybe if I use the complete path to that instruction can
> help.
> 
> Thanks again for your help
> 
> 
> On Thu, 13 Jan 2005 21:44:39 -0500, Marc Auslander
> <marcslists@optonline.net> wrote:
> > You need to debug further, and describe the problem more completely.
> > Since you can write to a trace file, you want to find out where the
> > two executions diverge.
> >
> > One standard trap - the environment variables, including path, are
> > going to be different when started by init.  If you are trying to exec
> > another program, or use the system() program which does this under the
> > covers, your call could be failing because the path is different.
> >
> > Also consider what userid you are running the daemon under in both cases.
> > --
> >
> 
> --
> "Meine Hoffnung soll mich leiten
> Durch die Tage ohne Dich
> Und die Liebe soll mich tragen
> Wenn der Schmerz die Hoffnung bricht"
> 


-- 
"Meine Hoffnung soll mich leiten
Durch die Tage ohne Dich
Und die Liebe soll mich tragen
Wenn der Schmerz die Hoffnung bricht"



Reply to: