From: Ray Olszewski <ray@comarre.com>
To: linux-newbie@vger.kernel.org
Subject: Re: recording a .wav file in a daemon.
Date: Wed, 17 Aug 2005 08:34:58 -0700 [thread overview]
Message-ID: <43035922.7060509@comarre.com> (raw)
In-Reply-To: <Pine.LNX.4.60.0508162310410.29955@lantana.cs.iitm.ernet.in>
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
next prev parent reply other threads:[~2005-08-17 15:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-12 5:27 programs/daemons/PIDs using the network Karthik Vishwanath
2005-08-13 3:48 ` _z33
2005-08-13 7:40 ` Richard Adams
2005-08-13 16:37 ` Ray Olszewski
2005-08-14 5:04 ` Karthik Vishwanath
2005-08-14 6:12 ` starting a user defined daemon at linux startup P.Manohar
2005-08-14 14:32 ` Arturas Moskvinas
2005-08-16 17:49 ` recording a .wav file in a daemon P.Manohar
2005-08-17 15:34 ` Ray Olszewski [this message]
2005-08-24 6:49 ` getting kernel symbols list in FC2 P.Manohar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43035922.7060509@comarre.com \
--to=ray@comarre.com \
--cc=linux-newbie@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox