Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
0f3c68aa
Commit
0f3c68aa
authored
May 28, 2003
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix breakage of LINUX_PROFILE code due to recent Windows changes.
parent
4df52b28
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
35 deletions
+26
-35
src/backend/postmaster/postmaster.c
src/backend/postmaster/postmaster.c
+26
-35
No files found.
src/backend/postmaster/postmaster.c
View file @
0f3c68aa
...
...
@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.33
0 2003/05/28 17:25:02
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.33
1 2003/05/28 19:36:28
tgl Exp $
*
* NOTES
*
...
...
@@ -269,12 +269,11 @@ static void dummy_handler(SIGNAL_ARGS);
static
void
CleanupProc
(
int
pid
,
int
exitstatus
);
static
void
LogChildExit
(
int
lev
,
const
char
*
procname
,
int
pid
,
int
exitstatus
);
static
int
BackendF
inalize
(
Port
*
port
);
static
int
BackendF
ork
(
Port
*
port
);
void
ExitPostmaster
(
int
status
);
static
void
usage
(
const
char
*
);
static
int
ServerLoop
(
void
);
static
int
BackendStartup
(
Port
*
port
);
static
void
BackendFork
(
Port
*
port
,
Backend
*
bn
);
static
int
ProcessStartupPacket
(
Port
*
port
,
bool
SSLdone
);
static
void
processCancelRequest
(
Port
*
port
,
void
*
pkt
);
static
int
initMasks
(
fd_set
*
rmask
,
fd_set
*
wmask
);
...
...
@@ -1240,7 +1239,7 @@ ProcessStartupPacket(Port *port, bool SSLdone)
* Now fetch parameters out of startup packet and save them into the
* Port structure. All data structures attached to the Port struct
* must be allocated in TopMemoryContext so that they won't disappear
* when we pass them to PostgresMain (see BackendF
inalize
). We need not worry
* when we pass them to PostgresMain (see BackendF
ork
). We need not worry
* about leaking this storage on failure, since we aren't in the postmaster
* process anymore.
*/
...
...
@@ -2080,7 +2079,25 @@ BackendStartup(Port *port)
pid
=
fork
();
if
(
pid
==
0
)
/* child */
BackendFork
(
port
,
bn
);
/* never returns */
{
int
status
;
#ifdef LINUX_PROFILE
setitimer
(
ITIMER_PROF
,
&
prof_itimer
,
NULL
);
#endif
#ifdef __BEOS__
/* Specific beos backend startup actions */
beos_backend_startup
();
#endif
free
(
bn
);
status
=
BackendFork
(
port
);
if
(
status
!=
0
)
elog
(
LOG
,
"connection startup failed"
);
proc_exit
(
status
);
}
/* in parent, error */
if
(
pid
<
0
)
...
...
@@ -2113,32 +2130,6 @@ BackendStartup(Port *port)
return
STATUS_OK
;
}
static
void
BackendFork
(
Port
*
port
,
Backend
*
bn
)
{
int
status
;
#ifdef LINUX_PROFILE
setitimer
(
ITIMER_PROF
,
&
prof_itimer
,
NULL
);
#endif
#ifdef __BEOS__
/* Specific beos backend startup actions */
beos_backend_startup
();
#endif
free
(
bn
);
status
=
BackendFinalize
(
port
);
if
(
status
!=
0
)
{
elog
(
LOG
,
"connection startup failed"
);
proc_exit
(
status
);
}
else
proc_exit
(
0
);
}
/*
* Try to report backend fork() failure to client before we close the
* connection. Since we do not care to risk blocking the postmaster on
...
...
@@ -2195,7 +2186,7 @@ split_opts(char **argv, int *argcp, char *s)
}
/*
* BackendF
inalize
-- perform authentication, and if successful, set up the
* BackendF
ork
-- perform authentication, and if successful, set up the
* backend's argument list and invoke backend main().
*
* This used to perform an execv() but we no longer exec the backend;
...
...
@@ -2206,7 +2197,7 @@ split_opts(char **argv, int *argcp, char *s)
* If PostgresMain() fails, return status.
*/
static
int
BackendF
inalize
(
Port
*
port
)
BackendF
ork
(
Port
*
port
)
{
char
*
remote_host
;
char
**
av
;
...
...
@@ -2343,7 +2334,7 @@ BackendFinalize(Port *port)
* indefinitely. PreAuthDelay doesn't count against the time limit.
*/
if
(
!
enable_sig_alarm
(
AuthenticationTimeout
*
1000
,
false
))
elog
(
FATAL
,
"BackendF
inalize
: Unable to set timer for auth timeout"
);
elog
(
FATAL
,
"BackendF
ork
: Unable to set timer for auth timeout"
);
/*
* Receive the startup packet (which might turn out to be a cancel
...
...
@@ -2372,7 +2363,7 @@ BackendFinalize(Port *port)
* SIGTERM/SIGQUIT again until backend startup is complete.
*/
if
(
!
disable_sig_alarm
(
false
))
elog
(
FATAL
,
"BackendF
inalize
: Unable to disable timer for auth timeout"
);
elog
(
FATAL
,
"BackendF
ork
: Unable to disable timer for auth timeout"
);
PG_SETMASK
(
&
BlockSig
);
if
(
Log_connections
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment