|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <signal.h>#include <sys/stat.h>#include <sys/wait.h>#include <unistd.h>#include "common/string.h"
Go to the source code of this file.
Macros | |
| #define | _DARWIN_BETTER_REALPATH |
| #define | log_error(errcodefn, ...) ereport(LOG, (errcodefn, errmsg_internal(__VA_ARGS__))) |
Functions | |
| static int | normalize_exec_path (char *path) |
| static char * | pg_realpath (const char *fname) |
| int | validate_exec (const char *path) |
| int | find_my_exec (const char *argv0, char *retpath) |
| int | find_other_exec (const char *argv0, const char *target, const char *versionstr, char *retpath) |
| char * | pipe_read_line (char *cmd) |
| int | pclose_check (FILE *stream) |
| void | set_pglocale_pgservice (const char *argv0, const char *app) |
| #define log_error | ( | errcodefn, | |
| ... | |||
| ) | ereport(LOG, (errcodefn, errmsg_internal(__VA_ARGS__))) |
Definition at line 66 of file exec.c.
Definition at line 161 of file exec.c.
References _, argv0, canonicalize_path(), errcode(), fb(), first_dir_separator(), first_path_var_separator(), join_path_components(), log_error, MAXPGPATH, Min, normalize_exec_path(), strlcpy(), and validate_exec().
Referenced by ensureCleanShutdown(), find_other_exec(), find_other_exec_or_die(), get_exec_path(), getInstallationPaths(), getRestoreCommand(), InitStandaloneProcess(), main(), main(), main(), process_psqlrc(), set_pglocale_pgservice(), setup(), and setup_bin_paths().
| int find_other_exec | ( | const char * | argv0, |
| const char * | target, | ||
| const char * | versionstr, | ||
| char * | retpath | ||
| ) |
Definition at line 311 of file exec.c.
References argv0, canonicalize_path(), EXE, fb(), find_my_exec(), last_dir_separator(), MAXPGPATH, pfree(), pipe_read_line(), snprintf, and validate_exec().
Referenced by ensureCleanShutdown(), find_other_exec_or_die(), get_exec_path(), getInstallationPaths(), getRestoreCommand(), isolation_start_test(), main(), main(), and setup_bin_paths().
Definition at line 242 of file exec.c.
References _, canonicalize_path(), errcode_for_file_access(), fb(), free, log_error, MAXPGPATH, pg_realpath(), and strlcpy().
Referenced by find_my_exec().
Definition at line 392 of file exec.c.
References _, errcode(), fb(), log_error, pfree(), and wait_result_to_str().
Referenced by pipe_read_line().
Definition at line 283 of file exec.c.
References fb().
Referenced by normalize_exec_path().
Definition at line 353 of file exec.c.
References _, errcode(), errcode_for_file_access(), fb(), log_error, pclose_check(), and pg_get_line().
Referenced by check_exec(), find_other_exec(), and getRestoreCommand().
Definition at line 430 of file exec.c.
References argv0, fb(), find_my_exec(), get_etc_path(), get_locale_path(), MAXPGPATH, my_exec_path, PG_TEXTDOMAIN, setenv, and setlocale.
Referenced by main(), main(), main(), and regression_main().
Definition at line 89 of file exec.c.
References buf, fb(), MAXPGPATH, pg_strcasecmp(), S_IRUSR, S_ISDIR, S_ISREG, S_IXUSR, stat, and strlcpy().
Referenced by check_exec(), find_my_exec(), and find_other_exec().