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]

RE: Annoying DOS boxes when using startxwin.bat


> -----Original Message-----
> From: Harold Hunt [mailto:huntharo@msu.edu]
> Sent: Tuesday, October 02, 2001 11:48 AM
> To: Robert Collins; cygx
> Subject: RE: Annoying DOS boxes when using startxwin.bat
> 
> 
> So, it would be a wrapper program that redirects stderr and spawns the
> desired process without the DOS box?
> 
> Harold
> 

Thats what I'm thinking. Keeping the actual programs simple, with output
to stderr is what I'm concerned about - so that we you folk want to see
debug stuff, it's there, and you don't need to patch every single X
compiled application (which would include non-XFree86 tree stuff too).

Hmm, stderr is just a file descriptor, so all we really need is (pseduo
code)
main  (int argc, char ** argv)
{
  for (int n=0; n < argc, n++) 
    {
      if (iswrapperarg (argv[n]))
	    processarg (argv[n]);
	else
	    addtochildargs (argv[n]);
    }
  if (logtofile)
    {
      fclose (stdin);
      if (stdout_is_console)
        fclose (stdout);
      redirectstderr(logfilename);
      detach_from_console
    }
  exec? (childproc, childargs);
}

Rob


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