Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3947f65

Browse files
committed
* postmaster.c: cleanup pmdaemonize under win32; missed failure message
in CreateOptsFile* s_lock.c: minor comment fix* findbe.c: variables not used under win32 moved within #ifndef WIN32caseClaudio Natoli
1 parent7b6fba9 commit3947f65

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.374 2004/03/1515:56:21 momjian Exp $
40+
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.375 2004/03/1516:18:42 momjian Exp $
4141
*
4242
* NOTES
4343
*
@@ -946,6 +946,10 @@ PostmasterMain(int argc, char *argv[])
946946
staticvoid
947947
pmdaemonize(intargc,char*argv[])
948948
{
949+
#ifdefWIN32
950+
/* not supported */
951+
elog(FATAL,"SilentMode not supported under WIN32");
952+
#else
949953
inti;
950954
pid_tpid;
951955

@@ -958,12 +962,7 @@ pmdaemonize(int argc, char *argv[])
958962
getitimer(ITIMER_PROF,&prof_itimer);
959963
#endif
960964

961-
#ifdefWIN32
962-
/* FIXME: [fork/exec] to be implemented? */
963-
abort();
964-
#else
965965
pid=fork();
966-
#endif
967966
if (pid== (pid_t)-1)
968967
{
969968
postmaster_error("could not fork background process: %s",
@@ -998,6 +997,7 @@ pmdaemonize(int argc, char *argv[])
998997
dup2(i,1);
999998
dup2(i,2);
1000999
close(i);
1000+
#endif
10011001
}
10021002

10031003

@@ -3230,7 +3230,10 @@ CreateOptsFile(int argc, char *argv[])
32303230
inti;
32313231

32323232
if (FindExec(fullprogname,argv[0],"postmaster")<0)
3233+
{
3234+
elog(LOG,"could not locate postmaster");
32333235
return false;
3236+
}
32343237

32353238
snprintf(filename,sizeof(filename),"%s/postmaster.opts",DataDir);
32363239

‎src/backend/storage/lmgr/s_lock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/storage/lmgr/s_lock.c,v 1.25 2004/02/10 03:42:45 tgl Exp $
12+
* $PostgreSQL: pgsql/src/backend/storage/lmgr/s_lock.c,v 1.26 2004/03/15 16:18:43 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -72,7 +72,7 @@ s_lock(volatile slock_t *lock, const char *file, int line)
7272
* (and thus the probability of unintended failure) than to fix the
7373
* total time spent.
7474
*
75-
* Theselect() delays are measured in centiseconds (0.01 sec) because 10
75+
* Thepg_usleep() delays are measured in centiseconds (0.01 sec) because 10
7676
* msec is a common resolution limit at the OS level.
7777
*/
7878
#defineSPINS_PER_DELAY100

‎src/backend/utils/init/findbe.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/utils/init/findbe.c,v 1.41 2004/02/02 00:11:31 momjian Exp $
10+
* $PostgreSQL: pgsql/src/backend/utils/init/findbe.c,v 1.42 2004/03/15 16:18:43 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -49,13 +49,13 @@ ValidateBinary(char *path)
4949
uid_teuid;
5050
structgroup*gp;
5151
structpasswd*pwp;
52+
inti;
53+
intin_grp=0;
5254
#else
5355
charpath_exe[MAXPGPATH+2+strlen(".exe")];
5456
#endif
55-
inti;
5657
intis_r=0;
5758
intis_x=0;
58-
intin_grp=0;
5959

6060
#ifdefWIN32
6161
/* Win32 requires a .exe suffix for stat() */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp