P.Manohar wrote:
hai,
I am calling this below script( call it recording.scr) from a c
program using system() , this C program is written as a daemon, so that
it will run continuously and executes this script periodically.
When I run this daemon in any terminal it is recording continously.
But when I run the same thing as original daemon like atd or sshd by
putting a script mydaemon in
/etc/rc.d/init.d/mydaemon start
This daemon is not recording.
Whether "brec" need a controlling terminal ?
I am confused with this. Please suggest me if u can.
#!/bin/tcsh
if($# != 1) then
echo "Argument filename"
exit(-1)
endif
echo "recording"
brec -s 96000 -b 16 -t 1 -w /usr/loca/xyz.wav
echo "recording over"
Thanks & Regrds,
P.Manohar.
I can offer only a guess in reply. The guess is that you need to have
the script call /usr/bin/brec (or whatever the path is) rather than
brec. When you call the daemon from a terminal, the user's PATH variable
fills in the blank. But when you run it as an init script, PATH is not
set in the environment so it does not.
BTW, do you really use /usr/loca/ as a directory on your system, and not
the more customary /usr/local/ ? Or is this some special directory
specific to this purpose?
The script seems odd in some other ways too (what is the purpose of the
requirement for a filename, for example), but they are hard to judge
without seeing the source for the C wrapper daemon as well as the script
itself.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs