in reply to Re: Perl/CGI Question - mod_perl IPC / Unix / mpg321...
in thread Perl/CGI Question - mod_perl IPC / Unix / mpg321...

I was also kinda hoping that I could get a general answer to my question... I'd prefer to learn to do it myself and not use some pre-built script... But I'll check those out too thanks!
  • Comment on Re: Re: Perl/CGI Question - mod_perl IPC / Unix / mpg321...

Replies are listed 'Best First'.
Re: Re: Re: Perl/CGI Question - mod_perl IPC / Unix / mpg321...
by Azhrarn (Friar) on May 19, 2003 at 19:18 UTC
    You could always read the code and see how the modules do it if you want to learn it for yourself. Don't be afraid to use modules if available. :)

    I'm sure they also appreciate if you combine your efforts and submit any improvements regarding versatility and such to the existing code base as well.
Re: Re: Re: Perl/CGI Question - mod_perl IPC / Unix / mpg321...
by perrin (Chancellor) on May 19, 2003 at 19:21 UTC
    Well, you have to turn mpg123 into a daemon and communicate with it through IPC. These modules demonstrate different ways to do that.
Re: Perl/CGI Question - mod_perl IPC / Unix / mpg321...
by zoonek (Novice) on May 20, 2003 at 14:28 UTC
    If you want a general answer, you can use named pipes, created by the mknod command. They solve the following problem: one can use pipes to divert the standard output of a program to the standard input of another one, but sometimes, one may want several programs (or several copies of the same program) to write to the standard input of a single program, one after the other. A named pipe look like a file, several programs may write to it, and a program reading from it would get the stream of data as if it came from a single file. But this Unix-specific mechanism is quite old---I wouldn't really advise using it for serious stuff.