[LAD] Program execution in a program with good communications
Jens M Andreasen
jens.andreasen at comhem.se
Thu Sep 11 11:29:57 UTC 2008
man popen, pclose is what you are looking for ..
On Thu, 2008-09-11 at 09:37 +0200, Julien Claassen wrote:
> Hello everyone!
> This is again a bit OT, but still. I have a program with two pthreads. One
> pthread is running an audio player on a file repeatedly, the other is waiting
> for a signal. If "the other" gets the signal or timeout, then it should tell
> the player to stop. Unfortunitely with mplayer kill -15 doesn't have the
> desired effect. So I thought:
> What if I could make mplayer's stdin available to the program and simply
> send character 'q'. But because of pthreads, I left fork and exec* alone and
> went with system. Any ideas what to do? If someone knows something nice with
> fork and the like, I've seen something with pipes for this. Otherwise the
> player-command I call can be called from within a shell script, so I can do
> funny things with redirections.
> I hope I made myself clear and didn't write too much again... :-(
> Kindest regards
> Julien
>
> --------
> Music was my first love and it will be my last (John Miles)
>
> ======== FIND MY WEB-PROJECT AT: ========
> http://ltsb.sourceforge.net
> the Linux TextBased Studio guide
> ======= AND MY PERSONAL PAGES AT: =======
> http://www.juliencoder.de
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev at lists.linuxaudio.org
> http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
More information about the Linux-audio-dev
mailing list