X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=server-src%2Fgetconf.c;h=c645ebdf3a812c42aad96f5c60fded247395a7c0;hb=1194fb66aa28d9929c3f2bef3cc6c1c3f40a60a4;hp=b495216d8ca4a7f71bdd51413c6afc577ed99946;hpb=2df780bff19c457b0debb7adc29972a0bc2a5dc2;p=debian%2Famanda diff --git a/server-src/getconf.c b/server-src/getconf.c index b495216..c645ebd 100644 --- a/server-src/getconf.c +++ b/server-src/getconf.c @@ -25,7 +25,7 @@ * University of Maryland at College Park */ /* - * $Id: getconf.c,v 1.8.4.2.2.2.2.4.2.3 2005/09/21 19:04:22 jrjackson Exp $ + * $Id: getconf.c,v 1.18 2006/01/14 04:37:19 paddy_s Exp $ * * a little wrapper to extract config variables for shell scripts */ @@ -34,8 +34,6 @@ #include "genversion.h" #include "conffile.h" -#define HOSTNAME_INSTANCE "host_inst" - int main P((int argc, char **argv)); static struct build_info { @@ -330,6 +328,9 @@ char **argv; } set_pname(pgm); + /* Don't die when child closes pipe */ + signal(SIGPIPE, SIG_IGN); + if(argc < 2) { fprintf(stderr, "Usage: %s [config] \n", pgm); exit(1); @@ -363,14 +364,14 @@ char **argv; #else i = -1; #endif - ap_snprintf(number, sizeof(number), "%ld", (long)i); + snprintf(number, sizeof(number), "%ld", (long)i); build_info[1].value = stralloc(number); #if defined(KRB4_SECURITY) i = TICKET_LIFETIME; #else i = -1; #endif - ap_snprintf(number, sizeof(number), "%ld", (long)i); + snprintf(number, sizeof(number), "%ld", (long)i); build_info[2].value = stralloc(number); #undef p