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

Commit3d7755c

Browse files
committed
Replace perror() calls by elog()s, so that messages can be routed to
syslog when appropriate. These were the last perror() calls remainingin the backend; let's not reintroduce any...
1 parentf764869 commit3d7755c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/backend/libpq/pqcomm.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
3030
* Portions Copyright (c) 1994, Regents of the University of California
3131
*
32-
*$Id: pqcomm.c,v 1.129 2002/03/06 06:09:47 momjian Exp $
32+
*$Id: pqcomm.c,v 1.130 2002/04/03 00:44:27 tgl Exp $
3333
*
3434
*-------------------------------------------------------------------------
3535
*/
@@ -364,7 +364,7 @@ StreamConnection(int server_fd, Port *port)
364364
(structsockaddr*)&port->raddr,
365365
&addrlen))<0)
366366
{
367-
perror("postmaster:StreamConnection: accept");
367+
elog(LOG,"StreamConnection: accept() failed: %m");
368368
returnSTATUS_ERROR;
369369
}
370370

@@ -383,7 +383,7 @@ StreamConnection(int server_fd, Port *port)
383383
if (getsockname(port->sock, (structsockaddr*)&port->laddr,
384384
&addrlen)<0)
385385
{
386-
perror("postmaster:StreamConnection: getsockname");
386+
elog(LOG,"StreamConnection: getsockname() failed: %m");
387387
returnSTATUS_ERROR;
388388
}
389389

@@ -395,13 +395,13 @@ StreamConnection(int server_fd, Port *port)
395395
if (setsockopt(port->sock,IPPROTO_TCP,TCP_NODELAY,
396396
(char*)&on,sizeof(on))<0)
397397
{
398-
perror("postmaster:StreamConnection: setsockopt(TCP_NODELAY)");
398+
elog(LOG,"StreamConnection: setsockopt(TCP_NODELAY) failed: %m");
399399
returnSTATUS_ERROR;
400400
}
401401
if (setsockopt(port->sock,SOL_SOCKET,SO_KEEPALIVE,
402402
(char*)&on,sizeof(on))<0)
403403
{
404-
perror("postmaster:StreamConnection: setsockopt(SO_KEEPALIVE)");
404+
elog(LOG,"StreamConnection: setsockopt(SO_KEEPALIVE) failed: %m");
405405
returnSTATUS_ERROR;
406406
}
407407
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp