On Fri, 11 Jan 2008, Sven Köhler wrote: > > However, the above is *not* equivalent to using run.exe in that it will > > not hide the console window (try it from a GUI). > > Just tested it. It's not true. > > I compiled my program with "gcc -o /bin/myrun.exe -mwindows" and > executed "c:\cygwin\bin\myrun.exe /bin/sleep 60" from Windows Explorer. > > No console window and sleep.exe runs. > > Also "c:\cygwin\bin\myrun.exe /bin/rxvt" works as expected. No console > window.
Actually, -mwindows just says that myrun.exe should not pop up a console window. The child process is a console app, and would have still popped up a console. Except that in Cygwin 1.5.x, spawnve always set wShowWindow to SW_HIDE before calling CreateProcess if the parent didn't have a tty, so, in effect, execve was doing the same as what run.exe was doing. Now, in Cygwin 1.7.x (a.k.a. CVS HEAD), this is no longer the case (since revision 1.243 of spawn.cc). The comment simply says "Drop pty_needs_alloc_console check" -- maybe Corinna can explain why it was dropped. So your program will not work as expected in the snapshots. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ [EMAIL PROTECTED] | [EMAIL PROTECTED] ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "That which is hateful to you, do not do to your neighbor. That is the whole Torah; the rest is commentary. Go and study it." -- Rabbi Hillel
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/