diff options
| author | Bruce Momjian | 2005-10-15 02:49:52 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2005-10-15 02:49:52 +0000 |
| commit | 1dc34982511d91ef8a2b71bdcb870f067c1b3da9 (patch) | |
| tree | 1046adab1d4b964e0c38afeec0ee6546f61d9a8a /src/backend/libpq | |
| parent | 790c01d28099587bbe2c623d4389b62ee49b1dee (diff) | |
Standard pgindent run for 8.1.
Diffstat (limited to 'src/backend/libpq')
| -rw-r--r-- | src/backend/libpq/auth.c | 93 | ||||
| -rw-r--r-- | src/backend/libpq/be-fsstubs.c | 45 | ||||
| -rw-r--r-- | src/backend/libpq/be-secure.c | 70 | ||||
| -rw-r--r-- | src/backend/libpq/crypt.c | 8 | ||||
| -rw-r--r-- | src/backend/libpq/hba.c | 106 | ||||
| -rw-r--r-- | src/backend/libpq/md5.c | 6 | ||||
| -rw-r--r-- | src/backend/libpq/pqcomm.c | 112 | ||||
| -rw-r--r-- | src/backend/libpq/pqformat.c | 11 | ||||
| -rw-r--r-- | src/backend/libpq/pqsignal.c | 11 |
9 files changed, 223 insertions, 239 deletions
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index 3bdddf86da4..240a02f0e93 100644 --- a/src/backend/libpq/auth.c +++ b/src/backend/libpq/auth.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.129 2005/10/13 22:55:19 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.130 2005/10/15 02:49:17 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -41,7 +41,7 @@ static char *recv_password_packet(Port *port); static int recv_and_check_password_packet(Port *port); char *pg_krb_server_keyfile; -char *pg_krb_srvnam; +char *pg_krb_srvnam; bool pg_krb_caseins_users; char *pg_krb_server_hostname = NULL; @@ -65,8 +65,8 @@ static struct pam_conv pam_passw_conv = { }; static char *pam_passwd = NULL; /* Workaround for Solaris 2.6 brokenness */ -static Port *pam_port_cludge; /* Workaround for passing "Port *port" - * into pam_passwd_conv_proc */ +static Port *pam_port_cludge; /* Workaround for passing "Port *port" into + * pam_passwd_conv_proc */ #endif /* USE_PAM */ #ifdef KRB5 @@ -119,7 +119,7 @@ static int pg_krb5_init(void) { krb5_error_code retval; - char *khostname; + char *khostname; if (pg_krb5_initialised) return STATUS_OK; @@ -147,8 +147,8 @@ pg_krb5_init(void) } /* - * If no hostname was specified, pg_krb_server_hostname is already - * NULL. If it's set to blank, force it to NULL. + * If no hostname was specified, pg_krb_server_hostname is already NULL. + * If it's set to blank, force it to NULL. */ khostname = pg_krb_server_hostname; if (khostname && khostname[0] == '\0') @@ -163,9 +163,9 @@ pg_krb5_init(void) { ereport(LOG, (errmsg("Kerberos sname_to_principal(\"%s\", \"%s\") returned error %d", - khostname ? khostname : "localhost", pg_krb_srvnam, retval))); + khostname ? khostname : "localhost", pg_krb_srvnam, retval))); com_err("postgres", retval, - "while getting server principal for server \"%s\" for service \"%s\"", + "while getting server principal for server \"%s\" for service \"%s\"", khostname ? khostname : "localhost", pg_krb_srvnam); krb5_kt_close(pg_krb5_context, pg_krb5_keytab); krb5_free_context(pg_krb5_context); @@ -260,7 +260,6 @@ pg_krb5_recvauth(Port *port) return ret; } - #else static int @@ -293,13 +292,13 @@ auth_failed(Port *port, int status) /* * If we failed due to EOF from client, just quit; there's no point in - * trying to send a message to the client, and not much point in - * logging the failure in the postmaster log. (Logging the failure - * might be desirable, were it not for the fact that libpq closes the - * connection unceremoniously if challenged for a password when it - * hasn't got one to send. We'll get a useless log entry for every - * psql connection under password auth, even if it's perfectly - * successful, if we log STATUS_EOF events.) + * trying to send a message to the client, and not much point in logging + * the failure in the postmaster log. (Logging the failure might be + * desirable, were it not for the fact that libpq closes the connection + * unceremoniously if challenged for a password when it hasn't got one to + * send. We'll get a useless log entry for every psql connection under + * password auth, even if it's perfectly successful, if we log STATUS_EOF + * events.) */ if (status == STATUS_EOF) proc_exit(0); @@ -351,9 +350,9 @@ ClientAuthentication(Port *port) /* * Get the authentication method to use for this frontend/database - * combination. Note: a failure return indicates a problem with the - * hba config file, not with the request. hba.c should have dropped - * an error message into the postmaster logfile if it failed. + * combination. Note: a failure return indicates a problem with the hba + * config file, not with the request. hba.c should have dropped an error + * message into the postmaster logfile if it failed. */ if (hba_getauthmethod(port) != STATUS_OK) ereport(FATAL, @@ -368,11 +367,11 @@ ClientAuthentication(Port *port) /* * This could have come from an explicit "reject" entry in * pg_hba.conf, but more likely it means there was no matching - * entry. Take pity on the poor user and issue a helpful - * error message. NOTE: this is not a security breach, - * because all the info reported here is known at the frontend - * and must be assumed known to bad guys. We're merely helping - * out the less clueful good guys. + * entry. Take pity on the poor user and issue a helpful error + * message. NOTE: this is not a security breach, because all the + * info reported here is known at the frontend and must be assumed + * known to bad guys. We're merely helping out the less clueful + * good guys. */ { char hostinfo[NI_MAXHOST]; @@ -384,14 +383,14 @@ ClientAuthentication(Port *port) #ifdef USE_SSL ereport(FATAL, - (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), - errmsg("no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\", %s", - hostinfo, port->user_name, port->database_name, - port->ssl ? _("SSL on") : _("SSL off")))); + (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), + errmsg("no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\", %s", + hostinfo, port->user_name, port->database_name, + port->ssl ? _("SSL on") : _("SSL off")))); #else ereport(FATAL, - (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), - errmsg("no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\"", + (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), + errmsg("no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\"", hostinfo, port->user_name, port->database_name))); #endif break; @@ -425,7 +424,7 @@ ClientAuthentication(Port *port) if (setsockopt(port->sock, 0, LOCAL_CREDS, &on, sizeof(on)) < 0) ereport(FATAL, (errcode_for_socket_access(), - errmsg("could not enable credential reception: %m"))); + errmsg("could not enable credential reception: %m"))); #endif sendAuthRequest(port, AUTH_REQ_SCM_CREDS); @@ -488,8 +487,8 @@ sendAuthRequest(Port *port, AuthRequest areq) pq_endmessage(&buf); /* - * Flush message so client will see it, except for AUTH_REQ_OK, which - * need not be sent until we are ready for queries. + * Flush message so client will see it, except for AUTH_REQ_OK, which need + * not be sent until we are ready for queries. */ if (areq != AUTH_REQ_OK) pq_flush(); @@ -526,15 +525,15 @@ pam_passwd_conv_proc(int num_msg, const struct pam_message ** msg, if (!appdata_ptr) { /* - * Workaround for Solaris 2.6 where the PAM library is broken and - * does not pass appdata_ptr to the conversation routine + * Workaround for Solaris 2.6 where the PAM library is broken and does + * not pass appdata_ptr to the conversation routine */ appdata_ptr = pam_passwd; } /* - * Password wasn't passed to PAM the first time around - let's go ask - * the client to send a password, which we then stuff into PAM. + * Password wasn't passed to PAM the first time around - let's go ask the + * client to send a password, which we then stuff into PAM. */ if (strlen(appdata_ptr) == 0) { @@ -695,15 +694,15 @@ recv_password_packet(Port *port) { /* * If the client just disconnects without offering a password, - * don't make a log entry. This is legal per protocol spec - * and in fact commonly done by psql, so complaining just - * clutters the log. + * don't make a log entry. This is legal per protocol spec and in + * fact commonly done by psql, so complaining just clutters the + * log. */ if (mtype != EOF) ereport(COMMERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("expected password response, got message type %d", - mtype))); + errmsg("expected password response, got message type %d", + mtype))); return NULL; /* EOF or bad message type */ } } @@ -723,8 +722,8 @@ recv_password_packet(Port *port) } /* - * Apply sanity check: password packet length should agree with length - * of contained string. Note it is safe to use strlen here because + * Apply sanity check: password packet length should agree with length of + * contained string. Note it is safe to use strlen here because * StringInfo is guaranteed to have an appended '\0'. */ if (strlen(buf.data) + 1 != buf.len) @@ -738,8 +737,8 @@ recv_password_packet(Port *port) /* * Return the received string. Note we do not attempt to do any - * character-set conversion on it; since we don't yet know the - * client's encoding, there wouldn't be much point. + * character-set conversion on it; since we don't yet know the client's + * encoding, there wouldn't be much point. */ return buf.data; } diff --git a/src/backend/libpq/be-fsstubs.c b/src/backend/libpq/be-fsstubs.c index 016884e425f..139f8946dd8 100644 --- a/src/backend/libpq/be-fsstubs.c +++ b/src/backend/libpq/be-fsstubs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/libpq/be-fsstubs.c,v 1.78 2005/06/13 02:26:48 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/libpq/be-fsstubs.c,v 1.79 2005/10/15 02:49:17 momjian Exp $ * * NOTES * This should be moved to a more appropriate place. It is here @@ -74,7 +74,7 @@ static MemoryContext fscxt = NULL; ALLOCSET_DEFAULT_INITSIZE, \ ALLOCSET_DEFAULT_MAXSIZE); \ } while (0) - + static int newLOfd(LargeObjectDesc *lobjCookie); static void deleteLOfd(int fd); @@ -198,8 +198,8 @@ lo_write(int fd, char *buf, int len) if ((cookies[fd]->flags & IFS_WRLOCK) == 0) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("large object descriptor %d was not opened for writing", - fd))); + errmsg("large object descriptor %d was not opened for writing", + fd))); Assert(fscxt != NULL); currentContext = MemoryContextSwitchTo(fscxt); @@ -289,9 +289,8 @@ lo_tell(PG_FUNCTION_ARGS) } /* - * We assume we do not need to switch contexts for inv_tell. That is - * true for now, but is probably more than this module ought to - * assume... + * We assume we do not need to switch contexts for inv_tell. That is true + * for now, but is probably more than this module ought to assume... */ PG_RETURN_INT32(inv_tell(cookies[fd])); } @@ -322,9 +321,9 @@ lo_unlink(PG_FUNCTION_ARGS) } /* - * inv_drop does not need a context switch, indeed it doesn't touch - * any LO-specific data structures at all. (Again, that's probably - * more than this module ought to be assuming.) + * inv_drop does not need a context switch, indeed it doesn't touch any + * LO-specific data structures at all. (Again, that's probably more than + * this module ought to be assuming.) */ PG_RETURN_INT32(inv_drop(lobjId)); } @@ -388,13 +387,13 @@ lo_import(PG_FUNCTION_ARGS) if (!superuser()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("must be superuser to use server-side lo_import()"), + errmsg("must be superuser to use server-side lo_import()"), errhint("Anyone can use the client-side lo_import() provided by libpq."))); #endif /* - * We don't actually need to switch into fscxt, but create it anyway - * to ensure that AtEOXact_LargeObject knows there is state to clean up + * We don't actually need to switch into fscxt, but create it anyway to + * ensure that AtEOXact_LargeObject knows there is state to clean up */ CreateFSContext(); @@ -462,13 +461,13 @@ lo_export(PG_FUNCTION_ARGS) if (!superuser()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("must be superuser to use server-side lo_export()"), + errmsg("must be superuser to use server-side lo_export()"), errhint("Anyone can use the client-side lo_export() provided by libpq."))); #endif /* - * We don't actually need to switch into fscxt, but create it anyway - * to ensure that AtEOXact_LargeObject knows there is state to clean up + * We don't actually need to switch into fscxt, but create it anyway to + * ensure that AtEOXact_LargeObject knows there is state to clean up */ CreateFSContext(); @@ -480,9 +479,9 @@ lo_export(PG_FUNCTION_ARGS) /* * open the file to be written to * - * Note: we reduce backend's normal 077 umask to the slightly friendlier - * 022. This code used to drop it all the way to 0, but creating - * world-writable export files doesn't seem wise. + * Note: we reduce backend's normal 077 umask to the slightly friendlier 022. + * This code used to drop it all the way to 0, but creating world-writable + * export files doesn't seem wise. */ nbytes = VARSIZE(filename) - VARHDRSZ; if (nbytes >= MAXPGPATH) @@ -533,8 +532,8 @@ AtEOXact_LargeObject(bool isCommit) currentContext = MemoryContextSwitchTo(fscxt); /* - * Close LO fds and clear cookies array so that LO fds are no longer - * good. On abort we skip the close step. + * Close LO fds and clear cookies array so that LO fds are no longer good. + * On abort we skip the close step. */ for (i = 0; i < cookies_size; i++) { @@ -587,8 +586,8 @@ AtEOSubXact_LargeObject(bool isCommit, SubTransactionId mySubid, else { /* - * Make sure we do not call inv_close twice if it errors - * out for some reason. Better a leak than a crash. + * Make sure we do not call inv_close twice if it errors out + * for some reason. Better a leak than a crash. */ deleteLOfd(i); inv_close(lo); diff --git a/src/backend/libpq/be-secure.c b/src/backend/libpq/be-secure.c index 01dc4f1af0d..a2404ebd38a 100644 --- a/src/backend/libpq/be-secure.c +++ b/src/backend/libpq/be-secure.c @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/libpq/be-secure.c,v 1.58 2005/07/04 04:51:46 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/libpq/be-secure.c,v 1.59 2005/10/15 02:49:17 momjian Exp $ * * Since the server static private key ($DataDir/server.key) * will normally be stored unencrypted so that the database @@ -103,7 +103,7 @@ #define ROOT_CERT_FILE "root.crt" #define SERVER_CERT_FILE "server.crt" -#define SERVER_PRIVATE_KEY_FILE "server.key" +#define SERVER_PRIVATE_KEY_FILE "server.key" static DH *load_dh_file(int keylength); static DH *load_dh_buffer(const char *, size_t); @@ -276,8 +276,8 @@ rloop: case SSL_ERROR_WANT_WRITE: #ifdef WIN32 pgwin32_waitforsinglesocket(SSL_get_fd(port->ssl), - (err==SSL_ERROR_WANT_READ) ? - FD_READ|FD_CLOSE : FD_WRITE|FD_CLOSE); + (err == SSL_ERROR_WANT_READ) ? + FD_READ | FD_CLOSE : FD_WRITE | FD_CLOSE); #endif goto rloop; case SSL_ERROR_SYSCALL: @@ -353,7 +353,7 @@ secure_write(Port *port, void *ptr, size_t len) if (port->ssl->state != SSL_ST_OK) ereport(COMMERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("SSL failed to send renegotiation request"))); + errmsg("SSL failed to send renegotiation request"))); port->ssl->state |= SSL_ST_ACCEPT; SSL_do_handshake(port->ssl); if (port->ssl->state != SSL_ST_OK) @@ -375,8 +375,8 @@ wloop: case SSL_ERROR_WANT_WRITE: #ifdef WIN32 pgwin32_waitforsinglesocket(SSL_get_fd(port->ssl), - (err==SSL_ERROR_WANT_READ) ? - FD_READ|FD_CLOSE : FD_WRITE|FD_CLOSE); + (err == SSL_ERROR_WANT_READ) ? + FD_READ | FD_CLOSE : FD_WRITE | FD_CLOSE); #endif goto wloop; case SSL_ERROR_SYSCALL: @@ -439,12 +439,12 @@ wloop: static bool my_bio_initialized = false; static BIO_METHOD my_bio_methods; -static int (*std_sock_read) (BIO *h, char *buf, int size); +static int (*std_sock_read) (BIO *h, char *buf, int size); static int my_sock_read(BIO *h, char *buf, int size) { - int res; + int res; prepare_for_client_read(); @@ -472,21 +472,21 @@ my_BIO_s_socket(void) static int my_SSL_set_fd(SSL *s, int fd) { - int ret=0; - BIO *bio=NULL; + int ret = 0; + BIO *bio = NULL; - bio=BIO_new(my_BIO_s_socket()); + bio = BIO_new(my_BIO_s_socket()); if (bio == NULL) { - SSLerr(SSL_F_SSL_SET_FD,ERR_R_BUF_LIB); + SSLerr(SSL_F_SSL_SET_FD, ERR_R_BUF_LIB); goto err; } - BIO_set_fd(bio,fd,BIO_NOCLOSE); - SSL_set_bio(s,bio,bio); - ret=1; + BIO_set_fd(bio, fd, BIO_NOCLOSE); + SSL_set_bio(s, bio, bio); + ret = 1; err: - return(ret); + return (ret); } /* @@ -539,7 +539,7 @@ load_dh_file(int keylength) (codes & DH_CHECK_P_NOT_SAFE_PRIME)) { elog(LOG, - "DH error (%s): neither suitable generator or safe prime", + "DH error (%s): neither suitable generator or safe prime", fnbuf); return NULL; } @@ -640,8 +640,8 @@ tmp_dh_cb(SSL *s, int is_export, int keylength) if (r == NULL || 8 * DH_size(r) < keylength) { ereport(DEBUG2, - (errmsg_internal("DH: generating parameters (%d bits)....", - keylength))); + (errmsg_internal("DH: generating parameters (%d bits)....", + keylength))); r = DH_generate_parameters(keylength, DH_GENERATOR_2, NULL, NULL); } @@ -735,30 +735,30 @@ initialize_SSL(void) SSL_FILETYPE_PEM)) ereport(FATAL, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("could not load server certificate file \"%s\": %s", - SERVER_CERT_FILE, SSLerrmessage()))); + errmsg("could not load server certificate file \"%s\": %s", + SERVER_CERT_FILE, SSLerrmessage()))); if (stat(SERVER_PRIVATE_KEY_FILE, &buf) == -1) ereport(FATAL, (errcode_for_file_access(), - errmsg("could not access private key file \"%s\": %m", - SERVER_PRIVATE_KEY_FILE))); + errmsg("could not access private key file \"%s\": %m", + SERVER_PRIVATE_KEY_FILE))); /* * Require no public access to key file. * - * XXX temporarily suppress check when on Windows, because there may - * not be proper support for Unix-y file permissions. Need to - * think of a reasonable check to apply on Windows. (See also the - * data directory permission check in postmaster.c) + * XXX temporarily suppress check when on Windows, because there may not + * be proper support for Unix-y file permissions. Need to think of a + * reasonable check to apply on Windows. (See also the data directory + * permission check in postmaster.c) */ #if !defined(WIN32) && !defined(__CYGWIN__) if (!S_ISREG(buf.st_mode) || (buf.st_mode & (S_IRWXG | S_IRWXO)) || buf.st_uid != geteuid()) ereport(FATAL, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("unsafe permissions on private key file \"%s\"", - SERVER_PRIVATE_KEY_FILE), + errmsg("unsafe permissions on private key file \"%s\"", + SERVER_PRIVATE_KEY_FILE), errdetail("File must be owned by the database user and must have no permissions for \"group\" or \"other\"."))); #endif @@ -861,8 +861,8 @@ aloop: case SSL_ERROR_WANT_WRITE: #ifdef WIN32 pgwin32_waitforsinglesocket(SSL_get_fd(port->ssl), - (err==SSL_ERROR_WANT_READ) ? - FD_READ|FD_CLOSE|FD_ACCEPT : FD_WRITE|FD_CLOSE); + (err == SSL_ERROR_WANT_READ) ? + FD_READ | FD_CLOSE | FD_ACCEPT : FD_WRITE | FD_CLOSE); #endif goto aloop; case SSL_ERROR_SYSCALL: @@ -873,7 +873,7 @@ aloop: else ereport(COMMERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("could not accept SSL connection: EOF detected"))); + errmsg("could not accept SSL connection: EOF detected"))); break; case SSL_ERROR_SSL: ereport(COMMERROR, @@ -884,7 +884,7 @@ aloop: case SSL_ERROR_ZERO_RETURN: ereport(COMMERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("could not accept SSL connection: EOF detected"))); + errmsg("could not accept SSL connection: EOF detected"))); break; default: ereport(COMMERROR, @@ -912,7 +912,7 @@ aloop: port->peer_dn, sizeof(port->peer_dn)); port->peer_dn[sizeof(port->peer_dn) - 1] = '\0'; X509_NAME_get_text_by_NID(X509_get_subject_name(port->peer), - NID_commonName, port->peer_cn, sizeof(port->peer_cn)); + NID_commonName, port->peer_cn, sizeof(port->peer_cn)); port->peer_cn[sizeof(port->peer_cn) - 1] = '\0'; } ereport(DEBUG2, diff --git a/src/backend/libpq/crypt.c b/src/backend/libpq/crypt.c index 4e91b1a36f0..b0a17aea53b 100644 --- a/src/backend/libpq/crypt.c +++ b/src/backend/libpq/crypt.c @@ -9,7 +9,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/libpq/crypt.c,v 1.65 2005/08/15 02:40:25 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/libpq/crypt.c,v 1.66 2005/10/15 02:49:17 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -148,9 +148,9 @@ md5_crypt_verify(const Port *port, const char *role, char *client_pass) TimestampTz vuntil; vuntil = DatumGetTimestampTz(DirectFunctionCall3(timestamptz_in, - CStringGetDatum(valuntil), - ObjectIdGetDatum(InvalidOid), - Int32GetDatum(-1))); + CStringGetDatum(valuntil), + ObjectIdGetDatum(InvalidOid), + Int32GetDatum(-1))); if (vuntil < GetCurrentTimestamp()) retval = STATUS_ERROR; diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index f565442ac68..734a4568d2a 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.147 2005/08/11 21:11:44 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.148 2005/10/15 02:49:17 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -80,9 +80,9 @@ static List **role_sorted = NULL; /* sorted role list, for bsearch() */ static int role_length; static void tokenize_file(const char *filename, FILE *file, - List **lines, List **line_nums); + List **lines, List **line_nums); static char *tokenize_inc_file(const char *outer_filename, - const char *inc_filename); + const char *inc_filename); /* * isblank() exists in the ISO C99 spec, but it's not very portable yet, @@ -136,8 +136,8 @@ next_token(FILE *fp, char *buf, int bufsz) } /* - * Build a token in buf of next characters up to EOF, EOL, unquoted - * comma, or unquoted whitespace. + * Build a token in buf of next characters up to EOF, EOL, unquoted comma, + * or unquoted whitespace. */ while (c != EOF && c != '\n' && (!pg_isblank(c) || in_quote == true)) @@ -158,8 +158,8 @@ next_token(FILE *fp, char *buf, int bufsz) *buf = '\0'; ereport(LOG, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("authentication file token too long, skipping: \"%s\"", - start_buf))); + errmsg("authentication file token too long, skipping: \"%s\"", + start_buf))); /* Discard remainder of line */ while ((c = getc(fp)) != EOF && c != '\n') ; @@ -189,8 +189,8 @@ next_token(FILE *fp, char *buf, int bufsz) } /* - * Put back the char right after the token (critical in case it is - * EOL, since we need to detect end-of-line at next call). + * Put back the char right after the token (critical in case it is EOL, + * since we need to detect end-of-line at next call). */ if (c != EOF) ungetc(c, fp); @@ -370,8 +370,8 @@ tokenize_inc_file(const char *outer_filename, foreach(token, token_list) { - int oldlen = strlen(comma_str); - int needed; + int oldlen = strlen(comma_str); + int needed; needed = oldlen + strlen(lfirst(token)) + 1; if (oldlen > 0) @@ -460,7 +460,7 @@ role_bsearch_cmp(const void *role, const void *list) /* * Lookup a role name in the pg_auth file */ -List ** +List ** get_role_line(const char *role) { /* On some versions of Solaris, bsearch of zero items dumps core */ @@ -495,8 +495,8 @@ is_member(const char *user, const char *role) return true; /* - * skip over the role name, password, valuntil, examine all the - * membership entries + * skip over the role name, password, valuntil, examine all the membership + * entries */ if (list_length(*line) < 4) return false; @@ -761,9 +761,9 @@ parse_hba(List *line, int line_num, hbaPort *port, { ereport(LOG, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("invalid IP address \"%s\" in file \"%s\" line %d: %s", - token, HbaFileName, line_num, - gai_strerror(ret)))); + errmsg("invalid IP address \"%s\" in file \"%s\" line %d: %s", + token, HbaFileName, line_num, + gai_strerror(ret)))); if (cidr_slash) *cidr_slash = '/'; if (gai_result) @@ -796,9 +796,9 @@ parse_hba(List *line, int line_num, hbaPort *port, { ereport(LOG, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("invalid IP mask \"%s\" in file \"%s\" line %d: %s", - token, HbaFileName, line_num, - gai_strerror(ret)))); + errmsg("invalid IP mask \"%s\" in file \"%s\" line %d: %s", + token, HbaFileName, line_num, + gai_strerror(ret)))); if (gai_result) freeaddrinfo_all(hints.ai_family, gai_result); goto hba_other_error; @@ -820,9 +820,9 @@ parse_hba(List *line, int line_num, hbaPort *port, if (addr.ss_family != port->raddr.addr.ss_family) { /* - * Wrong address family. We allow only one case: if the file - * has IPv4 and the port is IPv6, promote the file address to - * IPv6 and try to match that way. + * Wrong address family. We allow only one case: if the file has + * IPv4 and the port is IPv6, promote the file address to IPv6 and + * try to match that way. */ #ifdef HAVE_IPV6 if (addr.ss_family == AF_INET && @@ -869,14 +869,14 @@ hba_syntax: if (line_item) ereport(LOG, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("invalid entry in file \"%s\" at line %d, token \"%s\"", - HbaFileName, line_num, - (char *) lfirst(line_item)))); + errmsg("invalid entry in file \"%s\" at line %d, token \"%s\"", + HbaFileName, line_num, + (char *) lfirst(line_item)))); else ereport(LOG, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("missing field in file \"%s\" at end of line %d", - HbaFileName, line_num))); + errmsg("missing field in file \"%s\" at end of line %d", + HbaFileName, line_num))); /* Come here if suitable message already logged */ hba_other_error: @@ -928,7 +928,7 @@ load_role(void) /* Discard any old data */ if (role_lines || role_line_nums) free_lines(&role_lines, &role_line_nums); - if (role_sorted) + if (role_sorted) pfree(role_sorted); role_sorted = NULL; role_length = 0; @@ -957,8 +957,8 @@ load_role(void) role_length = list_length(role_lines); if (role_length) { - int i = 0; - ListCell *line; + int i = 0; + ListCell *line; /* We assume the flat file was written already-sorted */ role_sorted = palloc(role_length * sizeof(List *)); @@ -1124,7 +1124,7 @@ check_ident_usermap(const char *usermap_name, { ereport(LOG, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("cannot use Ident authentication without usermap field"))); + errmsg("cannot use Ident authentication without usermap field"))); found_entry = false; } else if (strcmp(usermap_name, "sameuser\n") == 0 || @@ -1191,12 +1191,10 @@ static bool interpret_ident_response(const char *ident_response, char *ident_user) { - const char *cursor = ident_response; /* Cursor into - * *ident_response */ + const char *cursor = ident_response; /* Cursor into *ident_response */ /* - * Ident's response, in the telnet tradition, should end in crlf - * (\r\n). + * Ident's response, in the telnet tradition, should end in crlf (\r\n). */ if (strlen(ident_response) < 2) return false; @@ -1230,9 +1228,8 @@ interpret_ident_response(const char *ident_response, else { /* - * It's a USERID response. Good. "cursor" should be - * pointing to the colon that precedes the operating - * system type. + * It's a USERID response. Good. "cursor" should be pointing + * to the colon that precedes the operating system type. */ if (*cursor != ':') return false; @@ -1280,10 +1277,9 @@ ident_inet(const SockAddr remote_addr, const SockAddr local_addr, char *ident_user) { - int sock_fd, /* File descriptor for socket on which we - * talk to Ident */ - rc; /* Return code from a locally called - * function */ + int sock_fd, /* File descriptor for socket on which we talk + * to Ident */ + rc; /* Return code from a locally called function */ bool ident_return; char remote_addr_s[NI_MAXHOST]; char remote_port[NI_MAXSERV]; @@ -1297,8 +1293,8 @@ ident_inet(const SockAddr remote_addr, hints; /* - * Might look a little weird to first convert it to text and then back - * to sockaddr, but it's protocol independent. + * Might look a little weird to first convert it to text and then back to + * sockaddr, but it's protocol independent. */ getnameinfo_all(&remote_addr.addr, remote_addr.salen, remote_addr_s, sizeof(remote_addr_s), @@ -1348,16 +1344,15 @@ ident_inet(const SockAddr remote_addr, { ereport(LOG, (errcode_for_socket_access(), - errmsg("could not create socket for Ident connection: %m"))); + errmsg("could not create socket for Ident connection: %m"))); ident_return = false; goto ident_inet_done; } /* - * Bind to the address which the client originally contacted, - * otherwise the ident server won't be able to match up the right - * connection. This is necessary if the PostgreSQL server is running - * on an IP alias. + * Bind to the address which the client originally contacted, otherwise + * the ident server won't be able to match up the right connection. This + * is necessary if the PostgreSQL server is running on an IP alias. */ rc = bind(sock_fd, la->ai_addr, la->ai_addrlen); if (rc != 0) @@ -1421,8 +1416,8 @@ ident_inet(const SockAddr remote_addr, ident_return = interpret_ident_response(ident_response, ident_user); if (!ident_return) ereport(LOG, - (errmsg("invalidly formatted response from Ident server: \"%s\"", - ident_response))); + (errmsg("invalidly formatted response from Ident server: \"%s\"", + ident_response))); ident_inet_done: if (sock_fd >= 0) @@ -1473,7 +1468,6 @@ ident_unix(int sock, char *ident_user) StrNCpy(ident_user, pass->pw_name, IDENT_USERNAME_MAX + 1); return true; - #elif defined(SO_PEERCRED) /* Linux style: use getsockopt(SO_PEERCRED) */ struct ucred peercred; @@ -1504,7 +1498,6 @@ ident_unix(int sock, char *ident_user) StrNCpy(ident_user, pass->pw_name, IDENT_USERNAME_MAX + 1); return true; - #elif defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) || (defined(HAVE_STRUCT_SOCKCRED) && defined(LOCAL_CREDS)) struct msghdr msg; @@ -1543,8 +1536,8 @@ ident_unix(int sock, char *ident_user) /* * The one character which is received here is not meaningful; its - * purposes is only to make sure that recvmsg() blocks long enough for - * the other side to send its credentials. + * purposes is only to make sure that recvmsg() blocks long enough for the + * other side to send its credentials. */ iov.iov_base = &buf; iov.iov_len = 1; @@ -1574,7 +1567,6 @@ ident_unix(int sock, char *ident_user) StrNCpy(ident_user, pw->pw_name, IDENT_USERNAME_MAX + 1); return true; - #else ereport(LOG, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), diff --git a/src/backend/libpq/md5.c b/src/backend/libpq/md5.c index 3c7fcd69127..f73d38795a6 100644 --- a/src/backend/libpq/md5.c +++ b/src/backend/libpq/md5.c @@ -14,7 +14,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/libpq/md5.c,v 1.28 2005/02/23 22:46:17 neilc Exp $ + * $PostgreSQL: pgsql/src/backend/libpq/md5.c,v 1.29 2005/10/15 02:49:18 momjian Exp $ */ @@ -329,8 +329,8 @@ EncryptMD5(const char *passwd, const char *salt, size_t salt_len, bool ret; /* - * Place salt at the end because it may be known by users trying to - * crack the MD5 output. + * Place salt at the end because it may be known by users trying to crack + * the MD5 output. */ strcpy(crypt_buf, passwd); memcpy(crypt_buf + passwd_len, salt, salt_len); diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c index d0904bfc7df..ccb4bcf2b51 100644 --- a/src/backend/libpq/pqcomm.c +++ b/src/backend/libpq/pqcomm.c @@ -30,7 +30,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.180 2005/09/24 17:53:14 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.181 2005/10/15 02:49:18 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -107,12 +107,10 @@ static char sock_path[MAXPGPATH]; #define PQ_BUFFER_SIZE 8192 static char PqSendBuffer[PQ_BUFFER_SIZE]; -static int PqSendPointer; /* Next index to store a byte in - * PqSendBuffer */ +static int PqSendPointer; /* Next index to store a byte in PqSendBuffer */ static char PqRecvBuffer[PQ_BUFFER_SIZE]; -static int PqRecvPointer; /* Next index to read a byte from - * PqRecvBuffer */ +static int PqRecvPointer; /* Next index to read a byte from PqRecvBuffer */ static int PqRecvLength; /* End of data available in PqRecvBuffer */ /* @@ -126,6 +124,7 @@ static bool DoingCopyOut; static void pq_close(int code, Datum arg); static int internal_putbytes(const char *s, size_t len); static int internal_flush(void); + #ifdef HAVE_UNIX_SOCKETS static int Lock_AF_UNIX(unsigned short portNumber, char *unixSocketName); static int Setup_AF_UNIX(void); @@ -178,11 +177,11 @@ pq_close(int code, Datum arg) secure_close(MyProcPort); /* - * Formerly we did an explicit close() here, but it seems better - * to leave the socket open until the process dies. This allows - * clients to perform a "synchronous close" if they care --- wait - * till the transport layer reports connection closure, and you - * can be sure the backend has exited. + * Formerly we did an explicit close() here, but it seems better to + * leave the socket open until the process dies. This allows clients + * to perform a "synchronous close" if they care --- wait till the + * transport layer reports connection closure, and you can be sure the + * backend has exited. * * We do set sock to -1 to prevent any further I/O, though. */ @@ -272,8 +271,8 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber, hostName, service, gai_strerror(ret)))); else ereport(LOG, - (errmsg("could not translate service \"%s\" to address: %s", - service, gai_strerror(ret)))); + (errmsg("could not translate service \"%s\" to address: %s", + service, gai_strerror(ret)))); if (addrs) freeaddrinfo_all(hint.ai_family, addrs); return STATUS_ERROR; @@ -284,8 +283,8 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber, if (!IS_AF_UNIX(family) && IS_AF_UNIX(addr->ai_family)) { /* - * Only set up a unix domain socket when they really asked for - * it. The service/port is different in that case. + * Only set up a unix domain socket when they really asked for it. + * The service/port is different in that case. */ continue; } @@ -368,9 +367,9 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber, /* * Note: This might fail on some OS's, like Linux older than - * 2.4.21-pre3, that don't have the IPV6_V6ONLY socket option, and - * map ipv4 addresses to ipv6. It will show ::ffff:ipv4 for all - * ipv4 connections. + * 2.4.21-pre3, that don't have the IPV6_V6ONLY socket option, and map + * ipv4 addresses to ipv6. It will show ::ffff:ipv4 for all ipv4 + * connections. */ err = bind(fd, addr->ai_addr, addr->ai_addrlen); if (err < 0) @@ -381,12 +380,12 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber, errmsg("could not bind %s socket: %m", familyDesc), (IS_AF_UNIX(addr->ai_family)) ? - errhint("Is another postmaster already running on port %d?" - " If not, remove socket file \"%s\" and retry.", - (int) portNumber, sock_path) : - errhint("Is another postmaster already running on port %d?" - " If not, wait a few seconds and retry.", - (int) portNumber))); + errhint("Is another postmaster already running on port %d?" + " If not, remove socket file \"%s\" and retry.", + (int) portNumber, sock_path) : + errhint("Is another postmaster already running on port %d?" + " If not, wait a few seconds and retry.", + (int) portNumber))); closesocket(fd); continue; } @@ -403,10 +402,9 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber, #endif /* - * Select appropriate accept-queue length limit. PG_SOMAXCONN is - * only intended to provide a clamp on the request on platforms - * where an overly large request provokes a kernel error (are - * there any?). + * Select appropriate accept-queue length limit. PG_SOMAXCONN is only + * intended to provide a clamp on the request on platforms where an + * overly large request provokes a kernel error (are there any?). */ maxconn = MaxBackends * 2; if (maxconn > PG_SOMAXCONN) @@ -472,8 +470,8 @@ Setup_AF_UNIX(void) /* * Fix socket ownership/permission if requested. Note we must do this - * before we listen() to avoid a window where unwanted connections - * could get accepted. + * before we listen() to avoid a window where unwanted connections could + * get accepted. */ Assert(Unix_socket_group); if (Unix_socket_group[0] != '\0') @@ -596,11 +594,11 @@ StreamConnection(int server_fd, Port *port) } /* - * Also apply the current keepalive parameters. If we fail to set - * a parameter, don't error out, because these aren't universally + * Also apply the current keepalive parameters. If we fail to set a + * parameter, don't error out, because these aren't universally * supported. (Note: you might think we need to reset the GUC - * variables to 0 in such a case, but it's not necessary because - * the show hooks for these variables report the truth anyway.) + * variables to 0 in such a case, but it's not necessary because the + * show hooks for these variables report the truth anyway.) */ (void) pq_setkeepalivesidle(tcp_keepalives_idle, port); (void) pq_setkeepalivesinterval(tcp_keepalives_interval, port); @@ -642,9 +640,9 @@ TouchSocketFile(void) if (sock_path[0] != '\0') { /* - * utime() is POSIX standard, utimes() is a common alternative. If - * we have neither, there's no way to affect the mod or access - * time of the socket :-( + * utime() is POSIX standard, utimes() is a common alternative. If we + * have neither, there's no way to affect the mod or access time of + * the socket :-( * * In either path, we ignore errors; there's no point in complaining. */ @@ -705,10 +703,9 @@ pq_recvbuf(void) continue; /* Ok if interrupted */ /* - * Careful: an ereport() that tries to write to the client - * would cause recursion to here, leading to stack overflow - * and core dump! This message must go *only* to the - * postmaster log. + * Careful: an ereport() that tries to write to the client would + * cause recursion to here, leading to stack overflow and core + * dump! This message must go *only* to the postmaster log. */ ereport(COMMERROR, (errcode_for_socket_access(), @@ -718,8 +715,8 @@ pq_recvbuf(void) if (r == 0) { /* - * EOF detected. We used to write a log message here, but - * it's better to expect the ultimate caller to do that. + * EOF detected. We used to write a log message here, but it's + * better to expect the ultimate caller to do that. */ return EOF; } @@ -925,7 +922,7 @@ pq_getmessage(StringInfo s, int maxlen) if (len > 0) { /* - * Allocate space for message. If we run out of room (ridiculously + * Allocate space for message. If we run out of room (ridiculously * large message), we will elog(ERROR), but we want to discard the * message body so as not to lose communication sync. */ @@ -1044,14 +1041,13 @@ internal_flush(void) continue; /* Ok if we were interrupted */ /* - * Careful: an ereport() that tries to write to the client - * would cause recursion to here, leading to stack overflow - * and core dump! This message must go *only* to the - * postmaster log. + * Careful: an ereport() that tries to write to the client would + * cause recursion to here, leading to stack overflow and core + * dump! This message must go *only* to the postmaster log. * * If a client disconnects while we're in the midst of output, we - * might write quite a bit of data before we get to a safe - * query abort point. So, suppress duplicate log messages. + * might write quite a bit of data before we get to a safe query + * abort point. So, suppress duplicate log messages. */ if (errno != last_reported_send_errno) { @@ -1187,14 +1183,14 @@ pq_getkeepalivesidle(Port *port) if (port->default_keepalives_idle == 0) { - socklen_t size = sizeof(port->default_keepalives_idle); + socklen_t size = sizeof(port->default_keepalives_idle); if (getsockopt(port->sock, IPPROTO_TCP, TCP_KEEPIDLE, (char *) &port->default_keepalives_idle, &size) < 0) { elog(LOG, "getsockopt(TCP_KEEPIDLE) failed: %m"); - port->default_keepalives_idle = -1; /* don't know */ + port->default_keepalives_idle = -1; /* don't know */ } } @@ -1219,7 +1215,7 @@ pq_setkeepalivesidle(int idle, Port *port) if (pq_getkeepalivesidle(port) < 0) { if (idle == 0) - return STATUS_OK; /* default is set but unknown */ + return STATUS_OK; /* default is set but unknown */ else return STATUS_ERROR; } @@ -1259,14 +1255,14 @@ pq_getkeepalivesinterval(Port *port) if (port->default_keepalives_interval == 0) { - socklen_t size = sizeof(port->default_keepalives_interval); + socklen_t size = sizeof(port->default_keepalives_interval); if (getsockopt(port->sock, IPPROTO_TCP, TCP_KEEPINTVL, (char *) &port->default_keepalives_interval, &size) < 0) { elog(LOG, "getsockopt(TCP_KEEPINTVL) failed: %m"); - port->default_keepalives_interval = -1; /* don't know */ + port->default_keepalives_interval = -1; /* don't know */ } } @@ -1291,7 +1287,7 @@ pq_setkeepalivesinterval(int interval, Port *port) if (pq_getkeepalivesinterval(port) < 0) { if (interval == 0) - return STATUS_OK; /* default is set but unknown */ + return STATUS_OK; /* default is set but unknown */ else return STATUS_ERROR; } @@ -1331,14 +1327,14 @@ pq_getkeepalivescount(Port *port) if (port->default_keepalives_count == 0) { - socklen_t size = sizeof(port->default_keepalives_count); + socklen_t size = sizeof(port->default_keepalives_count); if (getsockopt(port->sock, IPPROTO_TCP, TCP_KEEPCNT, (char *) &port->default_keepalives_count, &size) < 0) { elog(LOG, "getsockopt(TCP_KEEPCNT) failed: %m"); - port->default_keepalives_count = -1; /* don't know */ + port->default_keepalives_count = -1; /* don't know */ } } @@ -1363,7 +1359,7 @@ pq_setkeepalivescount(int count, Port *port) if (pq_getkeepalivescount(port) < 0) { if (count == 0) - return STATUS_OK; /* default is set but unknown */ + return STATUS_OK; /* default is set but unknown */ else return STATUS_ERROR; } diff --git a/src/backend/libpq/pqformat.c b/src/backend/libpq/pqformat.c index 284427b832a..46e75c5e049 100644 --- a/src/backend/libpq/pqformat.c +++ b/src/backend/libpq/pqformat.c @@ -24,7 +24,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/libpq/pqformat.c,v 1.39 2005/09/24 17:53:14 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/libpq/pqformat.c,v 1.40 2005/10/15 02:49:18 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -93,9 +93,8 @@ pq_beginmessage(StringInfo buf, char msgtype) /* * We stash the message type into the buffer's cursor field, expecting - * that the pq_sendXXX routines won't touch it. We could - * alternatively make it the first byte of the buffer contents, but - * this seems easier. + * that the pq_sendXXX routines won't touch it. We could alternatively + * make it the first byte of the buffer contents, but this seems easier. */ buf->cursor = msgtype; } @@ -664,8 +663,8 @@ pq_getmsgstring(StringInfo msg) str = &msg->data[msg->cursor]; /* - * It's safe to use strlen() here because a StringInfo is guaranteed - * to have a trailing null byte. But check we found a null inside the + * It's safe to use strlen() here because a StringInfo is guaranteed to + * have a trailing null byte. But check we found a null inside the * message. */ slen = strlen(str); diff --git a/src/backend/libpq/pqsignal.c b/src/backend/libpq/pqsignal.c index 6bc3535e83a..abf13e33fc9 100644 --- a/src/backend/libpq/pqsignal.c +++ b/src/backend/libpq/pqsignal.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/libpq/pqsignal.c,v 1.40 2005/02/14 23:02:35 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/libpq/pqsignal.c,v 1.41 2005/10/15 02:49:18 momjian Exp $ * * NOTES * This shouldn't be in libpq, but the monitor and some other @@ -50,7 +50,6 @@ sigset_t UnBlockSig, BlockSig, AuthBlockSig; - #else int UnBlockSig, BlockSig, @@ -83,9 +82,9 @@ pqinitmask(void) sigfillset(&AuthBlockSig); /* - * Unmark those signals that should never be blocked. Some of these - * signal names don't exist on all platforms. Most do, but might as - * well ifdef them all for consistency... + * Unmark those signals that should never be blocked. Some of these signal + * names don't exist on all platforms. Most do, but might as well ifdef + * them all for consistency... */ #ifdef SIGTRAP sigdelset(&BlockSig, SIGTRAP); @@ -135,7 +134,7 @@ pqinitmask(void) UnBlockSig = 0; BlockSig = sigmask(SIGQUIT) | sigmask(SIGTERM) | sigmask(SIGALRM) | - /* common signals between two */ + /* common signals between two */ sigmask(SIGHUP) | sigmask(SIGINT) | sigmask(SIGUSR1) | sigmask(SIGUSR2) | sigmask(SIGCHLD) | |
