Re: [PATCHES] psql \! WIN32 cleanup
John A Meinel <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.devel.win32 |
|---|---|
| Message-ID | <[email protected]> |
Bruce Momjian wrote: > Tom Lane wrote: > >>Bruce Momjian <[email protected]> writes: >> >>>The attached applied patch tests for COMSPEC in the right place and >>>supplies a reasonable shell default on Win32. >> >>>+ #define DEFAULT_SHELL "c:/windows/system32/cmd.exe" >> >>Is it really a good idea to assume that the Windows installation is on >>drive C: ? >> >>(This is an honest question, not a rhetorical one. I dunno whether >>inserting the C: is better than leaving it off. I can think of cases >>where either way will break, but I'm unsure what's most likely in >>practice.) > > > Not sure. Should we just do "/windows/system32/cmd.exe" and leave off > the C:? The previous default was "/bin/sh" and that certainly will not > work on Win32. > Do you need to supply the full path to the executable? Because if it is in the system PATH, then it should be found, and you can just do: #define DEFAULT_SHELL "cmd.exe" Or, if you allow environment variables, then something like: #define DEFAULT_SHELL "$WINDIR/system32/cmd.exe" is probably the way to go. John =:->
signature.asc
(application/pgp-signature, 253 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Cygwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBjGrpJdeBCYSNAAMRAgSuAKCC5E7RNDF/BFClpkkKuFJqFX+GmgCgvE/0 XsomenMuTSNjIsRqX7Z5Uqo= =2nk5 -----END PGP SIGNATURE-----