Frank,
On Tue, May 13, 2003 at 01:41:52PM -0400, Frank Seesink wrote:
> Jason Tishler wrote:
> >Use the following procedure:
> >
> > 1. Install bash as a service via cygrunsrv.
> > 2. Allow it to interact with the desktop.
> > 3. Start the service.
> > 4. Execute "echo $PATH" when it pops up.
>
> [snip]
>
> First, the "Allow service to interact with destkop" setting is only
> available when the service is started under the Local System account.
Oops, sorry for the misinformation. Shame on me -- I should have
checked again before writing the above.
> [snip]
>
> So short of another means (possibly some kind of script--avoiding
> desktop interaction--which saves the environment table to a file),
> not sure how to tell other than looking at source.
I just checked the source (cygrunsrv.cc:1076,1084):
char *env_path = getenv ("PATH");
if (!env_path)
setenv ("PATH", "/bin", 1);
else
{
char env_tmp[strlen (env_path) + 6];
***> strcat (strcpy (env_tmp, env_path), ":/bin"); <***
setenv ("PATH", env_tmp, 1);
}
Hence, "/bin" is appended not prepended.
Jason
--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6