This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Console anyone ?


On Wed, 21 May 2003, Benjamin Riefenstahl wrote:

> Hi Igor,
>
> Igor Pechtchanski <pechtcha@cs.nyu.edu> writes:
> > C:\cygwin\bin\run.exe C:\cygwin\bin\bash.exe --login -c
> > "(/usr/bin/X11/xterm -display localhost:0 -bg \#000000 -rv -fn 10x20
> > -rw -cu -si -sk -sb -sl 5000 +cn -T pechtcha-lt -n pechtcha-lt
> > >/dev/null 2>&1 &)"
>
> I get a console pop up and go away again with
>
>   run bash -c "(xterm >/dev/null 2>&1 &)"
>
> But not when I leave out any of ">/dev/null", "2>&1" or "&".  Looks
> like it's something to do with this combination of redirections and
> background execution.  As the redirected output goes to an invisible
> console created by "run" anyway, you should be fine with a simple
>
>   run bash -c "exec xterm"
>
> (Plus your other options and paths, of course ;-)).
>
> so long, benny

Wow.  Well, that certainly works, thanks...  Incidentally, the above also
fixes the cygcheck crash problem.

Now we need to find out why the above redirections and backgrounding cause
xterm to make "net" lose its console for stderr...  In fact, "run" and
subshell are not necessary, so the minimum command to reproduce the
problem is

  bash -c "exec xterm >o 2>e &"

provided /usr/X11R6/bin is in the PATH, and DISPLAY is set correctly.

Interestingly enough, if at least one stream remains intact (e.g., if

  bash -c "exec xterm 2>&1 >o &"

was run), the problem doesn't occur.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]