diff options
| author | Bruce Momjian <bruce@momjian.us> | 2004-01-11 03:49:31 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2004-01-11 03:49:31 +0000 |
| commit | 4cdf51e64627823088a3f94d21bafbb5fc87f9ea (patch) | |
| tree | b43d13540ef6329c97ee2a4de1605f3737a563bc /src/backend/postmaster/pgstat.c | |
| parent | ca7a1f0c868486ad11dc120c63f51b557abcc69d (diff) | |
| download | postgresql-4cdf51e64627823088a3f94d21bafbb5fc87f9ea.tar.gz | |
Drops in the CreateProcess calls for Win32 (essentially wrapping up the
fork/exec portion of the port), and fixes a handful of whitespace issues
Claudio Natoli
Diffstat (limited to 'src/backend/postmaster/pgstat.c')
| -rw-r--r-- | src/backend/postmaster/pgstat.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index 2522793d2a..6b9b8ac1bc 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -13,7 +13,7 @@ * * Copyright (c) 2001-2003, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.52 2004/01/09 04:58:09 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.53 2004/01/11 03:49:31 momjian Exp $ * ---------- */ #include "postgres.h" @@ -50,6 +50,9 @@ #include "utils/ps_status.h" #include "utils/syscache.h" +#ifdef WIN32 +extern pid_t win32_forkexec(const char* path, char *argv[]); +#endif /* ---------- * GUC parameters @@ -402,10 +405,13 @@ pgstat_forkexec(STATS_PROCESS_TYPE procType) Assert(ac <= lengthof(av)); /* Fire off execv in child */ +#ifdef WIN32 + pid = win32_forkexec(pg_pathname,av); +#else if ((pid = fork()) == 0 && (execv(pg_pathname,av) == -1)) /* FIXME: [fork/exec] suggestions for what to do here? Can't call elog... */ abort(); - +#endif return pid; /* Parent returns pid */ } |
