delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/12/01/17:31:20

From: JONCKHEERE AT d0tng DOT fnal DOT gov
Subject: RE: Feedback needed on proposed cygwin feature
1 Dec 1997 17:31:20 -0800 :
Message-ID: <971201101031.2680056c.cygnus.gnu-win32@d0tng.fnal.gov>
To: GNU-WIN32 AT cygnus DOT com
Cc: JONCKHEERE AT d0tng DOT fnal DOT gov

                                     D0TNG (D0 AXP cluster) @FNAL,  1-DEC-1997
---------------------------------------------------------------------------
> From:	SMTP%"cgf AT bbc DOT com"  1-DEC-1997 06:08:43.18
> To:	JONCKHEERE
> CC:	
> Subj:	Feedback needed on proposed cygwin feature
> 
> I have recently provided a patch to Cygnus to provide control of various
> environment variable settings on a program by program basis.

Is this patch generally available yet? If so where? If not when can we
expect to see it?
 
> Geoffrey has asked that I get feedback on my changes to see if they are
> something that is useful to the list as a whole.

From your discription it looks like *just* the sort of thing we need.
But probably needs some generalization.

We are porting a large body of code from Unix to NT, including the code
development system used on Unix (CVS and a home brewed set of scripts
and makefiles). It all works very well in the DOS command line window.
But we'd like to integrate it into the windows environment. The
biggest problem we face is that the various exes require different,
sometimes conflicting environment variable values.

At the moment we invoke each exe via a bash shell script which sets
the variables. But this is something of a kludge. It sounds like your
patch, or a generalization of it, might allow a much more elegant
solution to our problem. 
 
> My changes cause a program to read the registry for options settings prior
> to reading settings from the environment.  So, for instance, you can do
> something like this:
> 
> 	cygwin -o 'c:\bin\bash.exe' binmode notitle
> 
> That will set options in the registry which will cause bash to always
> use 'binmode' as its default and to never modify the title bar.
> 
> The available options are:
> 
> 	[no]binmode		- Set default open mode
> 	[no]title		- Display program names on the console
> 				  title bar
> 	[no]glob		- [Do not] interpret wild cards on commands
> 				  run from CMD.
> 	[no]strip_title		- [Do not] strip the path component of files
> 				  names displayed in the title bar
> 	[no]tty			- Attach a UNIX-style tty to the program
> 
> All of the above are available as normal CYGWIN_* environment variables:
> 
> 	CYGWIN_BINMODE, CYGWIN_NOBINMODE
> 	CYGWIN_TITLE, CYGWIN_NOTITLE
> 	etc.
> 
> These settings are similar to those found in Sergey's recent coolview
> release except that it is possible to say CYGWIN_NOTITLE as well as
> CYGWIN_TITLE.

Can the list of variables be expanded by the user? I'd like to be able
to do things like setting PYTHONPATH (or just PATH) to an arbitrary
value depending on the exe, and the version of the exe, I'm running. 
 
> Which leads into another source of discussion.  I would prefer something
> like this for setting these options:
> 
> 	set CYGWIN32=binmode notitle tty
> 
> rather than:
> 
> 	set CYGWIN_BINMODE=1
> 	set CYGWIN_TTY=1
> 	set CYGWIN_NOTITLE=1
> 
> My current patch allows both uses but it would probably better to stick
> with one.
> 
> Here are the pros and cons as we see them so far:
> 
> 1) Registry
> 
>     Pros:
> 
> 	a)  Don't need to mess with system environment variables.
> 
> 	b)  Allows pinpoint control of what program gets what options, e.g.
> 	    setting `tty' on for bash means that bash always starts with
> 	    a true /dev/tty.  Other programs run from the command line will
> 	    not also use tty handling as seen when using the CYGWIN_TTY
> 	    environment variable.
> 
> 	c)  "Solves" the problem of programs, ported from UNIX, which need
> 	    to use `binmode' by default.
> 
>     Cons:
> 
> 	a)  May slow down process startup slightly (I haven't noticed this
> 	    in simple tests, though).
> 
> 	b)  Contributes to creeping featuritis.
> 
> 	c)  The BINMODE option is nice, but may delay true port of a
> 	    product in favor of a "SET CYGWIN_BINMODE" band-aid.
> 
> 2) CYGWIN32
> 
>     Pros:
> 
> 	a)  Minimizes environment variable name space pollution.
> 
> 	b)  Mirrors proposed registry options syntax.
> 
> 	c)  More intuitive?
> 
>     Cons:
> 
> 	a)  May be harder to test for in shell scripts.
> 
> 	b)  Less intuitive?
> 
> I'd appreciate any and all feedback on this.  Please send comments to the list
> in general.
> 
> Thanks.

Naively, the cygwin32 form seems most appealing. But that depends on
the expandability of the list and if the list can be different for
each exe.

Hope this helps, Alan

> -- 
> http://www.bbc.com/	cgf AT bbc DOT com			"Strange how unreal
> VMS=>UNIX Solutions	Boston Business Computing	 the real can be."
> -
> For help on using this list (especially unsubscribing), send a message to
> "gnu-win32-request AT cygnus DOT com" with one line of text: "help".
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019