HI all,<br> <br> Recently I have been trying to improve support for some MinGW based IDEs without native msvcrt. Now I am dealing with a problem with standard io handle redirection which prevents output from gcc tools from being piped to IDE message windows.<br> <br> I have been able to find that the problem is related to this patch on dlls/msvcrt/file.c<br> <pre>http://cvs.winehq.org/cvsweb/wine/dlls/msvcrt/file.c.diff?r1=1.59&r2=1.60&f=h<br><br>It has a one line changlog saying:<br>Duplicate stdin/stdout handles to avoid closing them when library is<br>unloaded.<br><br>If I revert file.c to pre-patch state, redirection works fine. But<br>am not sure if there will be unexpected consequences. So I searched<br>the wine-patch and wine-devel archives but didn't find the patch or<br> any discussion about it.<br><br>Could someone explain what exactly that changelog line means?<br><br>A simple test
program<br>------------------------------------------------------------------------<br>#include "stdio.h"<br>#include "process.h"<br><br>int main(int argc, char* argv[])<br>{<br> if( argc == 1 )<br> {<br> char *argv2[] = { argv[0], "foo", NULL };<br> _spawnv(_P_NOWAIT, argv[0], argv2);<br> }<br> else<br> {<br> puts("This won't print with builtin msvcrt");<br> }<br> return 0;<br>}<br><br></pre> <br> <p>
                <hr size=1>Love cheap thrills? Enjoy PC-to-Phone <a href="http://us.rd.yahoo.com/mail_us/taglines/postman9/*http://us.rd.yahoo.com/evt=39666/*http://beta.messenger.yahoo.com/"> calls to 30+ countries</a> for just 2�/min with Yahoo! Messenger with Voice.