This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
RE: Annoying DOS boxes when using startxwin.bat
- To: "Harold Hunt" <huntharo at msu dot edu>,"cygx" <cygwin-xfree at cygwin dot com>
- Subject: RE: Annoying DOS boxes when using startxwin.bat
- From: "Robert Collins" <robert dot collins at itdomain dot com dot au>
- Date: Tue, 2 Oct 2001 14:56:24 +1000
> -----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