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

Sergio tioduke at gmail.com
Wed Nov 23 22:01:41 CST 2005

Eric Pouech wrote:

> Boaz Harrosh wrote:
>> Sergio wrote:
>>> I see. But I need to link to msvcrt for the rest of the functions in
>>> the dll
>>> I am trying to make. I only need popen to be linked using linux'
>>> libraries.
>>> Do you know what I can do to have both things (standard popen and wine's
>>> libraries for the rest of the dll)?
>> A second dll maybe. (That is not liked to msvcrt)
> what about dlopen/dlsym on (g)libc + popen ?

Thanks! dlopen/dlsym did the trick!

>> Also one more thing you could do is a small Winelib app
>> (run_unix.exe.so) that communicates STDIN STDOUT raw style through
>> GetStdHandle / ReadFile /WriteFile (see MSDN). and in tern popen() a
>> Linux process. So you do:
>> <Winelib_code>
>>    popen("run_unix param1 param2 ..." ,"rb+") ;
>> </Winelib_code>
>> Such a program could also be useful for a Native app that needs to run a
>> Linux application.
> we should even try to integrate it to popen in builtin msvcrt
> A+

More information about the wine-devel mailing list