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
f8009e17
Commit
f8009e17
authored
Oct 04, 1996
by
Marc G. Fournier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The remainder of D'Arcy's changes, most notibly the usage of SIGNAL_ARGS
parent
312b4dab
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
46 deletions
+36
-46
src/backend/postmaster/postmaster.c
src/backend/postmaster/postmaster.c
+15
-33
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+6
-6
src/include/commands/async.h
src/include/commands/async.h
+2
-6
src/mk/postgres.mk
src/mk/postgres.mk
+13
-1
No files found.
src/backend/postmaster/postmaster.c
View file @
f8009e17
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.
8 1996/09/26 03:17:44 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.
9 1996/10/04 20:16:18 scrappy
Exp $
*
* NOTES
*
...
...
@@ -156,20 +156,14 @@ static void pmdaemonize(void);
static
int
ConnStartup
(
Port
*
port
);
static
int
ConnCreate
(
int
serverFd
,
int
*
newFdP
);
static
void
reset_shared
(
short
port
);
#if defined(linux)
static
void
pmdie
(
int
);
static
void
reaper
(
int
);
static
void
dumpstatus
(
int
);
#else
static
void
pmdie
(
void
);
static
void
reaper
(
void
);
static
void
dumpstatus
();
#endif
static
void
pmdie
(
SIGNAL_ARGS
);
static
void
reaper
(
SIGNAL_ARGS
);
static
void
dumpstatus
(
SIGNAL_ARGS
);
static
void
CleanupProc
(
int
pid
,
int
exitstatus
);
static
int
DoExec
(
StartupInfo
*
packet
,
int
portFd
);
static
void
ExitPostmaster
(
int
status
);
static
void
usage
();
static
void
checkDataDir
();
static
void
usage
(
const
char
*
);
static
void
checkDataDir
(
void
);
int
ServerLoop
(
void
);
int
BackendStartup
(
StartupInfo
*
packet
,
Port
*
port
,
int
*
pidPtr
);
...
...
@@ -367,7 +361,7 @@ PostmasterMain(int argc, char *argv[])
}
static
void
pmdaemonize
()
pmdaemonize
(
void
)
{
int
i
;
...
...
@@ -387,7 +381,7 @@ pmdaemonize()
}
static
void
usage
(
char
*
progname
)
usage
(
c
onst
c
har
*
progname
)
{
fprintf
(
stderr
,
"usage: %s [options..]
\n
"
,
progname
);
fprintf
(
stderr
,
"
\t
-a authsys
\t
do/do not permit use of an authentication system
\n
"
);
...
...
@@ -405,7 +399,7 @@ usage(char *progname)
}
int
ServerLoop
()
ServerLoop
(
void
)
{
int
serverFd
=
ServerSock
;
fd_set
rmask
,
basemask
;
...
...
@@ -661,11 +655,7 @@ reset_shared(short port)
* pmdie -- signal handler for cleaning up after a kill signal.
*/
static
void
#if defined(PORTNAME_linux)
pmdie
(
int
i
)
#else
pmdie
()
#endif
pmdie
(
SIGNAL_ARGS
)
{
exitpg
(
0
);
}
...
...
@@ -674,11 +664,7 @@ pmdie()
* Reaper -- signal handler to cleanup after a backend (child) dies.
*/
static
void
#if defined(PORTNAME_linux)
reaper
(
int
i
)
#else
reaper
()
#endif
reaper
(
SIGNAL_ARGS
)
{
int
status
;
/* backend exit status */
int
pid
;
/* process id of dead backend */
...
...
@@ -1083,11 +1069,7 @@ ExitPostmaster(int status)
}
static
void
#if defined(PORTNAME_linux)
dumpstatus
(
int
i
)
#else
dumpstatus
()
#endif
dumpstatus
(
SIGNAL_ARGS
)
{
Dlelem
*
curr
=
DLGetHead
(
PortList
);
...
...
@@ -1104,7 +1086,7 @@ dumpstatus()
}
static
void
checkDataDir
()
checkDataDir
(
void
)
{
char
path
[
MAXPATHLEN
];
FILE
*
fp
;
...
...
src/backend/tcop/postgres.c
View file @
f8009e17
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.
8 1996/09/16 05:36:38
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.
9 1996/10/04 20:16:32
scrappy Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
...
...
@@ -707,13 +707,13 @@ pg_eval_dest(char *query_string, /* string to execute */
*/
void
handle_warn
()
handle_warn
(
SIGNAL_ARGS
)
{
siglongjmp
(
Warn_restart
,
1
);
}
void
quickdie
()
quickdie
(
SIGNAL_ARGS
)
{
elog
(
NOTICE
,
"I have been signalled by the postmaster."
);
elog
(
NOTICE
,
"Some backend process has died unexpectedly and possibly"
);
...
...
@@ -731,14 +731,14 @@ quickdie()
}
void
die
()
die
(
SIGNAL_ARGS
)
{
ExitPostgres
(
0
);
}
/* signal handler for floating point exception */
void
FloatExceptionHandler
()
FloatExceptionHandler
(
SIGNAL_ARGS
)
{
elog
(
WARN
,
"floating point exception! the last floating point operation eit\
her exceeded legal ranges or was a divide by zero"
);
...
...
@@ -1269,7 +1269,7 @@ PostgresMain(int argc, char *argv[])
*/
if
(
IsUnderPostmaster
==
false
)
{
puts
(
"
\n
POSTGRES backend interactive interface"
);
puts
(
"$Revision: 1.
8 $ $Date: 1996/09/16 05:36:38
$"
);
puts
(
"$Revision: 1.
9 $ $Date: 1996/10/04 20:16:32
$"
);
}
/* ----------------
...
...
src/include/commands/async.h
View file @
f8009e17
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: async.h,v 1.
1 1996/08/28 07:21:41
scrappy Exp $
* $Id: async.h,v 1.
2 1996/10/04 20:16:52
scrappy Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -15,11 +15,7 @@
#include "nodes/memnodes.h"
#if defined(PORTNAME_linux)
extern
void
Async_NotifyHandler
(
int
);
#else
extern
void
Async_NotifyHandler
(
void
);
#endif
extern
void
Async_NotifyHandler
(
SIGNAL_ARGS
);
extern
void
Async_Notify
(
char
*
relname
);
extern
void
Async_NotifyAtCommit
(
void
);
extern
void
Async_NotifyAtAbort
(
void
);
...
...
src/mk/postgres.mk
View file @
f8009e17
...
...
@@ -9,7 +9,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/mk/Attic/postgres.mk,v 1.
3 1996/09/23 08:24
:11 scrappy Exp $
# $Header: /cvsroot/pgsql/src/mk/Attic/postgres.mk,v 1.
4 1996/10/04 20:17
:11 scrappy Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -89,6 +89,18 @@ endef
include
$(MKDIR)/../Makefile.global
-include
$(MKDIR)/port/postgres.mk.$(PORTNAME)
# The following is used as the arg list for signal handlers. Any ports
# that take something other than an int argument should change this in
# the port specific makefile. Note that variable names are required
# because it is used in both the prototypes as well as the definitions.
# Note also the long name. We expect that this won't collide with
# other names causing compiler warnings.
#ifndef SIGNAL_ARGS
#define SIGNAL_ARGS int postgres_signal_arg
#endif
CFLAGS
+=
-DSIGNAL_ARGS
=
$(SIGNAL_ARGS)
CURDIR
:=
$(
shell
pwd
)
# This is where we put all the .o's and the generated files.
...
...
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