system not working as expected

Doru Carastan doru.carastan@windriver.com
Thu Oct 4 12:17:00 GMT 2001


Jorge,

As everyone here agrees, the best way to do it is to make sure that /bin
is in your path. When you start from BASH your PATH has /bin, /usr/bin
and /usr/local/bin added by /etc/profile. When you start from Explorer
or a DOS prompt you have only the system environment PATH.

My suggestion is to adjust the path at runtime as part of your
application initialization code. The best way to do it is to check for
each of /bin, /usr/bin and /usr/local/bin directories and prepend them
to your process $PATH. The easy way is to simply prepend
"/usr/local/bin:/usr/bin:/bin:" to the value of $PATH. Read your process
$PATH using getenv() and set it with putenv(). Your child process will
inherit your settings.

Does anyone know why the man page for putenv is missing in Cygwin?

Doru C.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list