Re: [LAD] Program execution in a program with good communications

From: Jens M Andreasen <jens.andreasen@email-addr-hidden>
Date: Thu Sep 11 2008 - 14:29:57 EEST

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@email-addr-hidden
> http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Thu Sep 11 16:15:02 2008

This archive was generated by hypermail 2.1.8 : Thu Sep 11 2008 - 16:15:02 EEST