On Saturday 26 January 2008 14:41, Nguyen Thai Ngoc Duy wrote: > Hi, > > The new spawn implementation now hits me worse as it won't (can't?) > save file handle attributes such as O_APPEND.. This makes me think > about Windows console issue that led to the new spawn patch. Could we > just compile git with -mwindows and revert part of the patch? We don't > really use Windows console, only standard file handles. > > I tried a simple program to emulate git-gui/fetch case, a GUI (t1) > spawns a console app (t2), then feeds it a string via t2' stdin. It > still works well if I make t2 a GUI app. > > Comments?
The problematic case was not GUI -> console but GUI -> console -> console The unwanted console window appeared for the second program (the grandchild). I'd appreciate if you could implement a working patch in git that shows what you want to do. BTW, there is a mechanism that passes the O_APPEND information on to the child process, only it is not implemented. It's not too complicated, but not trivial, either. Read more here: http://www.catch22.net/tuts/undoc01.asp in the section "Pass arbitrary data to a child process!" that explains how handle information is passed in lpReserved2. (For git it's sufficient to pass only information about the first 3 file handles.) -- Hannes
