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
f27a4696
Commit
f27a4696
authored
Jan 31, 2010
by
Magnus Hagander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove now unnecessary loop around CallNamedPipe().
Radu Ilie
parent
04a4413c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
16 deletions
+6
-16
src/port/kill.c
src/port/kill.c
+6
-16
No files found.
src/port/kill.c
View file @
f27a4696
...
...
@@ -9,7 +9,7 @@
* signals that the backend can recognize.
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/kill.c,v 1.1
3 2010/01/02 16:58:13 momjian
Exp $
* $PostgreSQL: pgsql/src/port/kill.c,v 1.1
4 2010/01/31 17:18:28 mha
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -25,7 +25,6 @@ pgkill(int pid, int sig)
BYTE
sigData
=
sig
;
BYTE
sigRet
=
0
;
DWORD
bytes
;
int
pipe_tries
;
/* we allow signal 0 here, but it will be ignored in pg_queue_signal */
if
(
sig
>=
PG_SIGNAL_COUNT
||
sig
<
0
)
...
...
@@ -41,14 +40,6 @@ pgkill(int pid, int sig)
}
snprintf
(
pipename
,
sizeof
(
pipename
),
"
\\\\
.
\\
pipe
\\
pgsignal_%u"
,
pid
);
/*
* Writing data to the named pipe can fail for transient reasons.
* Therefore, it is useful to retry if it fails. The maximum number of
* calls to make was empirically determined from a 90-hour notification
* stress test.
*/
for
(
pipe_tries
=
0
;
pipe_tries
<
3
;
pipe_tries
++
)
{
if
(
CallNamedPipe
(
pipename
,
&
sigData
,
1
,
&
sigRet
,
1
,
&
bytes
,
1000
))
{
if
(
bytes
!=
1
||
sigRet
!=
sig
)
...
...
@@ -58,7 +49,6 @@ pgkill(int pid, int sig)
}
return
0
;
}
}
if
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
)
errno
=
ESRCH
;
...
...
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