popen() to execute\read a Linux (not windows) command

Sergio sergio.t at videotron.ca
Sun Nov 20 15:10:18 CST 2005


Hi,

>From a win32 program compiled with winelib I am trying to execute the
following:
FILE *program;
if (program = popen("dcop amarok player nowPlaying", "r"))
        fgets(buff, sizeof(buff), program);
The idea is to read the current track amarok's playing. But I keep receiving
the following text: "File not found". Later I tried changing to :
popen("ls", "r"), and the same problem arised. Finally I changed to
popen("dir", "r") and then I got some data read (first line of the dir
command). So, what I understand is that the popen function is
opening/reading only windows programs. How can I make it open a pipe on a
Linux' one? Is there something like linux_popen()?

Thanks. Sergio.





More information about the wine-devel mailing list