summaryrefslogtreecommitdiff
path: root/src/port/exec.c
AgeCommit message (Collapse)Author
2004-11-27Work around lack of NLS support in libpgport by making those componentsPeter Eisentraut
who use it scan the relevant source files for their own catalog. It creates a bit of duplicate work for translators, but it gets the job done for now.
2004-11-06Add code to find_my_exec() to resolve a symbolic link down to theTom Lane
actual executable location. This allows people to continue to use setups where, eg, postmaster is symlinked from a convenient place. Per gripe from Josh Berkus.
2004-11-06Code cleanup in path.c and exec.c. Handle Windows drive and network specsTom Lane
everywhere not just some places, get rid of . and .. when joining path sections together. This should eliminate most of the ugly paths like /foo/bar/./baz that we've been generating.
2004-10-18Remove use of "miscadmin.h" in port C files and remove test for frontendBruce Momjian
in miscadmin.h.
2004-10-07Adjust comments previously moved to column 1 by pgident.Bruce Momjian
2004-09-27Small WIN32_CLIENT_ONLY cleanup for new build patch.Bruce Momjian
2004-09-27More Win32 cleanups for Dave Page.Bruce Momjian
2004-09-27Make adjustment for MS VC and BCC compile of psql, from Dave Page.Bruce Momjian
2004-08-29Pgindent run for 8.0.Bruce Momjian
2004-08-29Update copyright to 2004.Bruce Momjian
2004-08-16Fix for adding \n for zero-length win32 read_pipe returnBruce Momjian
2004-08-16Clarify need for \r\n -> \n translation in version checking code.Bruce Momjian
2004-08-09Path-mangling logic was failing to account for paths containing mentionsTom Lane
of '.' or '..'. Extend canonicalize_path() to trim off trailing occurrences of these things, and use it to fix up paths where needed (which I think is only after places where we trim the last path component, but maybe some others will turn up). Fixes Josh's complaint that './initdb' does not work.
2004-08-09Fix Win32 pg_dumpall check.REL8_0_0BETA1Bruce Momjian
2004-08-08Fix Win32 pg_dumpall, with help from Claudio.Bruce Momjian
2004-08-08Improve comment.Bruce Momjian
2004-07-26Here is a patch that fixes the pipes used in find_other_exec() whenBruce Momjian
running as a service on windows <= 2000. Required to make the pg_ctl service wrapper to work at all. Magnus Hagander
2004-06-10Attached is a patch that takes care of the PATHSEP issue. I made a moreBruce Momjian
extensive change then what was suggested. I found the file path.c that contained a lot of "Unix/Windows" agnostic functions so I added a function there instead and removed the PATHSEP declaration in exec.c altogether. All to keep things from scattering all over the code. I also took the liberty of changing the name of the functions "first_path_sep" and "last_path_sep". Where I come from (and I'm apparently not alone given the former macro name PATHSEP), they should be called "first_dir_sep" and "last_dir_sep". The new function I introduced, that actually finds path separators, is now the "first_path_sep". The patch contains changes on all affected places of course. I also changed the documentation on dynamic_library_path to reflect the chagnes. Thomas Hallgren
2004-05-24Remove pstrdup() call from exec.c because DLLIMPORT flag onBruce Momjian
CurrentMemoryContext caused compile problems. Recode to not make a copy of the PATH but copy parts out into MAXPGPATH variables.
2004-05-24Make validate_exec take a const char *, for gcc 3.4, which is moreBruce Momjian
strict.
2004-05-21Fix random breakage in exec.c for platforms where strdup is a macro.Tom Lane
2004-05-20Small variable rename in exec.c.Bruce Momjian
2004-05-20Clean up find_my_exec to work cleaner.Bruce Momjian
Add Win32 code to look in the current directory before the path. Add code so memory is allocated using palloc in backend object files.
2004-05-19Re-add elog() to exec.c, per Tom.Bruce Momjian
2004-05-19Supress verbose stderr messages while trying to find my exec path.Bruce Momjian
Per report from Christopher.
2004-05-18Move find_my_exec() way up into main.c so it is available to theBruce Momjian
timezone code and other places. Remove elog() calls from find_my_exec; do fprintf(stderr) instead. We can then remove the exec.c handling in the makefile because it doesn't have to be built to suppress elog calls.
2004-05-18Clean up some relative path install issues with Claudio's help.Bruce Momjian
2004-05-17Reorganize code to allow path-relative installs.Bruce Momjian
Create new get_* functions to access compiled-in paths and adjust if relative installs are to be used. Clean up substitute_libpath_macro() code.
2004-05-14Adjust find_my_exec/find_other_exec() so that the return parameter isBruce Momjian
last, not first. This fits our style better.
2004-05-13Reorganize backend code to more cleanly manage executable names andBruce Momjian
backend startup.
2004-05-13Fix Win32 bug with missing errno for strerror().Bruce Momjian
2004-05-12Rename find_my_binary/find_other_binary toBruce Momjian
find_my_exec/find_other_exec(). Remove passing of progname to these functions as they can find that out from argv[0], which they already have. Make get_progname return const char *, and update all progname variables to be const char *.
2004-05-11As part of the work for making relocatable installs, I have re-factoredBruce Momjian
all the code that looks for other binaries. I move FindExec into port/exec.c (and renamed it to find_my_binary()). I also added find_other_binary that looks for another binary in the same directory as the calling program, and checks the version string. The only behavior change was that initdb and pg_dump would look in the hard-coded bindir directory if it can't find the requested binary in the same directory as the caller. The new code throws an error. The old behavior seemed too error prone for version mismatches.