From: Joe Wreschnig Date: 2002-06-08T09:04:46+09:00 Subject: FIFO IPC questions --=-QC+NSiy6uN7x9Uzs5+2x Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, I'm somewhat of a newbie, so bear with me if these questions are stupid/frequently asked. First, I have a program that I'm using to try and communicate with mpg321 (a GPLd clone of mpg123, a UNIX mp3 player) at http://www.sacredchao.net/debian/server.rb and http://www.sacredchao.net/debian/test.rb (not in this mail because server.rb, where the problem is, is pretty long). test.rb takes a song to play as a parameter and then pauses/unpauses it a few times to test it. Except when I try to pause/unpause, mpg321 reports an error that looks like "@E Unknown command 's.mp3'" or some other string that's a truncated version of the filename I gave it to load. If I attach the FIFO to stdout instead of mpg321, I don't see any weird filenames, and also, I also see this truncation problem when I send an EOF to mpg321 at a tty. Is my code sending spurious EOFs somewhere? Dealing with the same program, but a more general question - right now I popen the mpg123 process for write, and redirect output to a FIFO, which I open for reading. In Perl, I'd use IPC::Open2; does Ruby have a similar function in the standard libraries, or is there a more canonical way than what I'm doing now (e.g. pipe and fork)? Thanks! --=20 - Joe Wreschnig - http://www.sacredchao.net "What I did was justified because I had a policy of my own... It's okay to be different, to not conform to society." -- Chen Kenichi, Iron Chef Chinese --=-QC+NSiy6uN7x9Uzs5+2x Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQA9AUleTFkUq7Drx3cRAkMJAKC8jEUPDSFW2lVW30xBLdm7FevkYgCdFXCc AXmHT4FAt8hZ2Ss/nF8vxCo= =U1x9 -----END PGP SIGNATURE----- --=-QC+NSiy6uN7x9Uzs5+2x--