crossroads

Git mirror of https://crossroads.e-tunity.com/
git clone git://git.finwo.net/app/crossroads
Log | Files | Refs | LICENSE

commit 075d3470636b2cfa4fb6e892ecd75185b4e9b0e7
parent 762f5d9b29968c0eff3e3a0b9b2f1cda76869768
Author: finwo <finwo@pm.me>
Date:   Sat,  3 Jan 2026 19:30:58 +0100

1.28

Diffstat:
MChangeLog | 8++++++++
Mdoc/crossroads.html | 4++--
Mdoc/crossroads.man | 4++--
Mdoc/crossroads.pdf | 0
Metc/Makefile.def | 2+-
Msrc/Makefile | 1+
Msrc/allocreporter.c | 2+-
Msrc/ansistamp.c | 3++-
Msrc/backendavailable.c | 2+-
Msrc/backendconnect.c | 2+-
Msrc/backendcount.c | 2+-
Msrc/choosebackend.c | 2+-
Msrc/configtest.c | 2+-
Msrc/copysockets.c | 2+-
Msrc/createcommandlinespace.c | 2+-
Msrc/crossroads.h | 2+-
Msrc/deallocreporter.c | 2+-
Msrc/decrclientcount.c | 10+++++++++-
Msrc/error.c | 5+++--
Msrc/forktcpservicer.c | 11+++++++----
Msrc/httpcopy.c | 2+-
Msrc/httperror.c | 2+-
Msrc/httpheaderaddheader.c | 19++++++++++++++++++-
Msrc/httpheaderappendheader.c | 2+-
Msrc/httpheaderconnectiontype.c | 2+-
Msrc/httpheaderfree.c | 3++-
Msrc/httpheaderhascookie.c | 2+-
Msrc/httpheaderhttpver.c | 2+-
Msrc/httpheadernew.c | 2+-
Msrc/httpheaderread.c | 2+-
Msrc/httpheaderremoveheader.c | 2+-
Msrc/httpheadersetheader.c | 2+-
Msrc/httpheaderval.c | 2+-
Msrc/httpheaderwrite.c | 6+++---
Msrc/httpinsertheader.c | 2+-
Msrc/httpserve.c | 22+++++++++++++++++++++-
Msrc/httpserversocket.c | 2+-
Msrc/httpwrite.c | 2+-
Msrc/incrclientcount.c | 10+++++++++-
Msrc/initsockaddr.c | 2+-
Msrc/interrupt.c | 17++++++++++++++---
Msrc/ipfaddallow.c | 2+-
Msrc/ipfadddeny.c | 2+-
Msrc/ipfallowed.c | 2+-
Msrc/ipfdenied.c | 2+-
Msrc/ipfloadfile.c | 2+-
Msrc/ipfmatch.c | 2+-
Msrc/ipfparse.c | 2+-
Msrc/ishexdigit.c | 2+-
Msrc/isspace.c | 2+-
Msrc/lexer.c | 2+-
Msrc/lockreporter.c | 4++--
Msrc/logactivityany.c | 2+-
Msrc/logactivitycontinuation.c | 2+-
Msrc/logactivityend.c | 2+-
Msrc/logactivitystart.c | 2+-
Msrc/main.c | 2+-
Msrc/makesocket.c | 2+-
Msrc/markactivity.c | 14++++++++++++--
Msrc/msg.c | 2+-
Msrc/msgdumpbuf.c | 2+-
Msrc/netbuffer.c | 3++-
Msrc/netbufread.c | 2+-
Msrc/netcopy.c | 2+-
Msrc/netread.c | 2+-
Msrc/netwrite.c | 20+++++++++++---------
Msrc/parser.c | 2+-
Msrc/parser.h | 2+-
Msrc/restart.c | 2+-
Msrc/runservice.c | 3++-
Msrc/serve.c | 2+-
Msrc/setprogramtitle.c | 2+-
Msrc/showservices.c | 2+-
Msrc/showstatus.c | 2+-
Msrc/stagetostring.c | 2+-
Msrc/statetostring.c | 2+-
Msrc/stopdaemon.c | 2+-
Msrc/strcasestr.c | 2+-
Msrc/strexpandformat.c | 2+-
Msrc/stringtostate.c | 2+-
Msrc/strlcat.c | 2+-
Msrc/strprintf.c | 2+-
Msrc/strvprintf.c | 2+-
Msrc/sysrun.c | 12++++++++----
Msrc/tcpserve.c | 2+-
Msrc/tellservice.c | 2+-
Msrc/thruputlog.c | 2+-
Msrc/trafficlog.c | 2+-
Msrc/uidassume.c | 3++-
Msrc/uidrestore.c | 2+-
Msrc/unlockreporter.c | 4++--
Msrc/usage.c | 2+-
Msrc/vsyslog.c | 2+-
Msrc/wakeuphandler.c | 2+-
Msrc/warning.c | 2+-
Msrc/writelog.c | 2+-
Msrc/xmalloc.c | 2+-
Msrc/xrealloc.c | 2+-
Msrc/xstrcat.c | 2+-
Msrc/xstrcatch.c | 2+-
Msrc/xstrdup.c | 2+-
101 files changed, 220 insertions(+), 122 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,6 +1,14 @@ ChangeLog for Crossroads ------------------------------------------------------------------------------ +1.28 [KK 2007-02-15] Added small dependencies to src/Makefile. Added + debugging code to http_header_add(). The signal handler (see + interrupt.c) will exit immediately upon SIGPIPE when in serving + mode. There is no need to wait for the current request to finish, + when one of the network pipes has gone. Change exiting to _exit() + instead of exit() to avoid cleanup code execution. Misc small + changes in http mode. + 1.27 [KK 2007-02-14] Verbosity gets set correctly in HTTP type services. diff --git a/doc/crossroads.html b/doc/crossroads.html @@ -1,12 +1,12 @@ <a name="defs.yo"></a><html><head> -<title>Crossroads 1.27</title> +<title>Crossroads 1.28</title> <link rel="stylesheet" type="text/css" href="http://www.e-tunity.com/css/yodl.css"> <link rel="stylesheet" type="text/css" href="http://www.e-tunity.com/css/yodl.css"> <link rev="made" href="mailto:info@e-tunity.com"> </head> <body> <hr> -<h1>Crossroads 1.27</h1> +<h1>Crossroads 1.28</h1> <h2>Karel Kubat</h2> <h2>e-tunity</h2><h2>2005, 2006, ff.</h2> diff --git a/doc/crossroads.man b/doc/crossroads.man @@ -1,6 +1,6 @@ -.TH "Crossroads 1\&.27" "2005, 2006, ff\&." +.TH "Crossroads 1\&.28" "2005, 2006, ff\&." .PP -.SH "Crossroads 1\&.27" +.SH "Crossroads 1\&.28" .SH "Karel Kubat" .SH "e-tunity" .SH "2005, 2006, ff\&." diff --git a/doc/crossroads.pdf b/doc/crossroads.pdf Binary files differ. diff --git a/etc/Makefile.def b/etc/Makefile.def @@ -3,7 +3,7 @@ # Versioning. This defines the overall version ID and must match the topmost # entry in the ChangeLog. -VER = 1.27 +VER = 1.28 # Default config DEFAULT_CONF = /etc/crossroads.conf diff --git a/src/Makefile b/src/Makefile @@ -78,3 +78,4 @@ clean: usage.o: usage.c usage.h ../etc/Makefile.def main.o: main.c crossroads.h ../etc/Makefile.def sampleconf.o: sampleconf.c sampleconf.h +strexpandformat.o: strexpandformat.c ../etc/Makefile.def diff --git a/src/allocreporter.c b/src/allocreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/ansistamp.c b/src/ansistamp.c @@ -1,8 +1,9 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ + #include "crossroads.h" char *ansistamp (TmType t) { diff --git a/src/backendavailable.c b/src/backendavailable.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/backendconnect.c b/src/backendconnect.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/backendcount.c b/src/backendcount.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/choosebackend.c b/src/choosebackend.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/configtest.c b/src/configtest.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/copysockets.c b/src/copysockets.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/createcommandlinespace.c b/src/createcommandlinespace.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/crossroads.h b/src/crossroads.h @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/deallocreporter.c b/src/deallocreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/decrclientcount.c b/src/decrclientcount.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -24,5 +24,13 @@ void decr_client_count () { activeservice->name, totclients); unlock_reporter(); } + + msg ("Service %s: extcmd-onend: " + " current_backend = %d, clients = %d, totclients = %d, cmd = %s", + activeservice->name, current_backend, + servicereport->backendstate[current_backend].nclients, + servicereport->nclients, + activeservice->backend[current_backend].onend); + sysrun (activeservice->backend[current_backend].onend); } diff --git a/src/error.c b/src/error.c @@ -1,8 +1,9 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ + #include "crossroads.h" void error (char const *fmt, ...) { @@ -16,5 +17,5 @@ void error (char const *fmt, ...) { else writelog (LOG_ERR, "ERROR: %s", str); free (str); - exit (1); + _exit (1); } diff --git a/src/forktcpservicer.c b/src/forktcpservicer.c @@ -1,13 +1,17 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ + #include "crossroads.h" int fork_tcp_servicer (int to_backend) { int pid, i; + msg ("Service %s: Forking TCP servicer (to back end: %d)", + activeservice->name, to_backend); + if ( (pid = fork()) < 0 ) /* Fork failure */ error ("Service %s: failed to fork: %s", @@ -26,15 +30,14 @@ int fork_tcp_servicer (int to_backend) { /* Forked for the second time... */ program_stage = stage_serving; - if (to_backend > 0) + if (to_backend >= 0) set_program_title ("Service %s: serving %s to %s", client_ip, activeservice->name, activeservice->backend [current_backend].name); else set_program_title ("Service %s: serving %s", - client_ip, - activeservice->name); + activeservice->name, client_ip); return (0); } diff --git a/src/httpcopy.c b/src/httpcopy.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/httperror.c b/src/httperror.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/httpheaderaddheader.c b/src/httpheaderaddheader.c @@ -1,10 +1,26 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ #include "crossroads.h" +// #define DEBUG + +#ifdef DEBUG +static void debughdr (HttpHeader *h) { + int i; + msg ("http header add: %d headers so far", h->nheader); + for (i = 0; i < h->nheader; i++) + msg ("http header add: header[%d] '%s'", + i, h->header[i]); +} + +#define SHOWHEADERS(h) debughdr((h)) +#else +#define SHOWHEADERS(h) +#endif + void http_header_addheader (HttpHeader *m, char const *h) { char *exp; @@ -12,4 +28,5 @@ void http_header_addheader (HttpHeader *m, char const *h) { msg ("Service %s: adding header '%s'", activeservice->name, exp); m->header = xrealloc (m->header, (m->nheader + 1) * sizeof(char*)); m->header[m->nheader++] = exp; + SHOWHEADERS(m); } diff --git a/src/httpheaderappendheader.c b/src/httpheaderappendheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/httpheaderconnectiontype.c b/src/httpheaderconnectiontype.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/httpheaderfree.c b/src/httpheaderfree.c @@ -1,8 +1,9 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ + #include "crossroads.h" void http_header_free (HttpHeader *m) { diff --git a/src/httpheaderhascookie.c b/src/httpheaderhascookie.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/httpheaderhttpver.c b/src/httpheaderhttpver.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/httpheadernew.c b/src/httpheadernew.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/httpheaderread.c b/src/httpheaderread.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/httpheaderremoveheader.c b/src/httpheaderremoveheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/httpheadersetheader.c b/src/httpheadersetheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/httpheaderval.c b/src/httpheaderval.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/httpheaderwrite.c b/src/httpheaderwrite.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -8,8 +8,8 @@ void http_header_write (HttpHeader *m, int sock, CopyDirection dir) { int i; - msg ("Service %s: Sending HTTP headers to %s", - activeservice->name, + msg ("Service %s: Sending %d HTTP headers to %s", + activeservice->name, m->nheader, dir == dir_server_to_client ? "client" : "server"); for (i = 0; i < m->nheader; i++) { diff --git a/src/httpinsertheader.c b/src/httpinsertheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/httpserve.c b/src/httpserve.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -30,6 +30,9 @@ void http_serve (int clientsock) { */ while (1) { + /* Reset network IO buffers. */ + clbufpos = clbufmax = srbufpos = srbufmax = 0; + /* Assume both client and server want to persist. */ client_persisting = server_persisting = 1; @@ -182,6 +185,23 @@ void http_serve (int clientsock) { activeservice->name); } + /* We're done analyzing. If there's leftovers in the network buffers, + * then we flush them first. */ + if (clbufmax) { + msg ("Service %s: Flushing client-side buffer to server, %u bytes", + activeservice->name, clbufmax - clbufpos); + http_write (serversock, dir_client_to_server, + clbuf + clbufpos, clbufmax - clbufpos); + clbufmax = clbufpos = 0; + } + if (srbufmax) { + msg ("Service %s: Flushing server-side buffer to client, %u bytes", + activeservice->name, srbufmax - srbufpos); + http_write (clientsock, dir_server_to_client, + srbuf + srbufpos, srbufmax - srbufpos); + srbufmax = srbufpos = 0; + } + /* Copy through all that arrives on back end or client. * This doesn't return... */ msg ("Service %s: HTTP service done analyzing, entering copy-thru mode", diff --git a/src/httpserversocket.c b/src/httpserversocket.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/httpwrite.c b/src/httpwrite.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/incrclientcount.c b/src/incrclientcount.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -22,6 +22,14 @@ void incr_client_count () { servicereport->backendstate[i].nclients; servicereport->nclients = totclients; unlock_reporter(); + + msg ("Service %s: extcmd-onstart: " + " current_backend = %d, clients = %d, totclients = %d, cmd = %s", + activeservice->name, current_backend, + servicereport->backendstate[current_backend].nclients, + servicereport->nclients, + activeservice->backend[current_backend].onstart); + sysrun (activeservice->backend[current_backend].onstart); msg ("Service %s: Activity on back end %d now %d, total %d", diff --git a/src/initsockaddr.c b/src/initsockaddr.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/interrupt.c b/src/interrupt.c @@ -1,8 +1,9 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ + #include "crossroads.h" /* Signal handler */ @@ -29,6 +30,16 @@ void interrupt (int sig) { return; } + /* SIGPIPE(13) is handled differently incase of stage_serving. One + * of the network connections has disappeared, there's no use in + * continuing. */ + if (sig == SIGPIPE && program_stage == stage_serving) { + msg ("Service %s: servicer caught SIGPIPE, stopping now", + activeservice->name); + decr_client_count(); + _exit (0); + } + /* For all other signals: flag that we're signalled, and depending on * the stage, exit right away or wait 'till the servicer stops. */ @@ -45,7 +56,7 @@ void interrupt (int sig) { if (close (listen_sock)) error ("Service %s: can't close socket %d: %s", activeservice->name, listen_sock, strerror(errno)); - exit (0); + _exit (0); case stage_serving: warning ("Service %s: servicer caught signal %d, " "will exit after servicing my connection", @@ -59,6 +70,6 @@ void interrupt (int sig) { default: msg ("Caught signal %d in program stage %s, exiting", sig, stage_to_string (program_stage)); - exit (0); + _exit (0); } } diff --git a/src/ipfaddallow.c b/src/ipfaddallow.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/ipfadddeny.c b/src/ipfadddeny.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/ipfallowed.c b/src/ipfallowed.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/ipfdenied.c b/src/ipfdenied.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/ipfloadfile.c b/src/ipfloadfile.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/ipfmatch.c b/src/ipfmatch.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/ipfparse.c b/src/ipfparse.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/ishexdigit.c b/src/ishexdigit.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/isspace.c b/src/isspace.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lexer.c b/src/lexer.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lockreporter.c b/src/lockreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -25,7 +25,7 @@ void lock_reporter() { warning ("Failed to lock reporter memory (stage %s): %s", stage_to_string (program_stage), strerror(errno)); if (program_stage != stage_serving) - exit (1); + _exit (1); else warning (".. but continuing serving this TCP connection"); } diff --git a/src/logactivityany.c b/src/logactivityany.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/logactivitycontinuation.c b/src/logactivitycontinuation.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/logactivityend.c b/src/logactivityend.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/logactivitystart.c b/src/logactivitystart.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/main.c b/src/main.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/makesocket.c b/src/makesocket.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/markactivity.c b/src/markactivity.c @@ -1,8 +1,9 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ + #include "crossroads.h" void mark_activity (unsigned long long nbytes, double nsec, @@ -96,6 +97,15 @@ void mark_activity (unsigned long long nbytes, double nsec, (servicereport->backendstate[current_backend].avail)); /* Run the onfailure hook if one is specified. */ - if (newstate == st_unavailable) + if (newstate == st_unavailable) { + + msg ("Service %s: extcmd-onfail: " + " current_backend = %d, clients = %d, totclients = %d, cmd = %s", + activeservice->name, current_backend, + servicereport->backendstate[current_backend].nclients, + servicereport->nclients, + activeservice->backend[current_backend].onfail); + sysrun (activeservice->backend[current_backend].onfail); + } } diff --git a/src/msg.c b/src/msg.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/msgdumpbuf.c b/src/msgdumpbuf.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/netbuffer.c b/src/netbuffer.c @@ -1,8 +1,9 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ + #include "crossroads.h" unsigned char *net_buffer (CopyDirection dir, unsigned *sz) { diff --git a/src/netbufread.c b/src/netbufread.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/netcopy.c b/src/netcopy.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/netread.c b/src/netread.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/netwrite.c b/src/netwrite.c @@ -1,15 +1,16 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ + #include "crossroads.h" /* Define DUMPFILE if you want Crossroads to dump the contents of what's * written to the client or to the server to * /tmp/crossroads-sentto{client,server}.dump. This is of course for deep * mode debugging only. - */ + */ // #define DUMPFILE int net_write (int sock, unsigned char const *buf, unsigned buflen, @@ -60,12 +61,10 @@ int net_write (int sock, unsigned char const *buf, unsigned buflen, "on socket %d", activeservice->name, is_client ? "client" : "server", sock); - + decr_client_count(); log_activity_end(); - if (!is_client) - mark_activity (0, 0, st_unavailable); - exit (0); + _exit (0); } if (FD_ISSET (sock, &exset)) { @@ -80,11 +79,14 @@ int net_write (int sock, unsigned char const *buf, unsigned buflen, /* Check for finished / errors */ if (ret < 1) { + warning ("Service %s: write says %d bytes written: %s", + activeservice->name, ret, strerror(errno)); decr_client_count(); log_activity_end (); if (ret < 0) - error ("Service %s: write error when copying to %s", + error ("Service %s: write error when sending to %s", activeservice->name, is_client ? "client" : "server"); + _exit (0); } /* Update activity. */ @@ -96,5 +98,5 @@ int net_write (int sock, unsigned char const *buf, unsigned buflen, /* Signal caller how many bytes were written. */ return (ret); } - - + + diff --git a/src/parser.c b/src/parser.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/parser.h b/src/parser.h @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/restart.c b/src/restart.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/runservice.c b/src/runservice.c @@ -1,8 +1,9 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ + #include "crossroads.h" void runservice () { diff --git a/src/serve.c b/src/serve.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/setprogramtitle.c b/src/setprogramtitle.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/showservices.c b/src/showservices.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/showstatus.c b/src/showstatus.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/stagetostring.c b/src/stagetostring.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/statetostring.c b/src/statetostring.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/stopdaemon.c b/src/stopdaemon.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/strcasestr.c b/src/strcasestr.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/strexpandformat.c b/src/strexpandformat.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/stringtostate.c b/src/stringtostate.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/strlcat.c b/src/strlcat.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/strprintf.c b/src/strprintf.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/strvprintf.c b/src/strvprintf.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/sysrun.c b/src/sysrun.c @@ -1,22 +1,26 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ + #include "crossroads.h" void sysrun (char const *cmd) { char *expanded; int ret; - if (!cmd) + if (!cmd || ! *cmd) return; + + kill (getpid(), SIGSEGV); + expanded = str_expand_format (cmd); msg ("Service %s: running command: '%s'", activeservice->name, expanded); uid_assume(); if ( (ret = system (expanded)) ) - warning ("Service %s: command '%s' returned %d", - activeservice->name, expanded, ret); + warning ("Service %s: command '%s' -> '%s' returned %d", + activeservice->name, cmd, expanded, ret); uid_restore(); free (expanded); } diff --git a/src/tcpserve.c b/src/tcpserve.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/tellservice.c b/src/tellservice.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/thruputlog.c b/src/thruputlog.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/trafficlog.c b/src/trafficlog.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/uidassume.c b/src/uidassume.c @@ -1,8 +1,9 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ + #include "crossroads.h" void uid_assume() { diff --git a/src/uidrestore.c b/src/uidrestore.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/unlockreporter.c b/src/unlockreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -19,7 +19,7 @@ void unlock_reporter() { warning ("Failed to unlock reporter memory (stage %s): %s", stage_to_string (program_stage), strerror(errno)); if (program_stage != stage_serving) - exit (1); + _exit (1); else warning (".. but continuing serving this TCP connection"); } diff --git a/src/usage.c b/src/usage.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/vsyslog.c b/src/vsyslog.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/wakeuphandler.c b/src/wakeuphandler.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/warning.c b/src/warning.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/writelog.c b/src/writelog.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/xmalloc.c b/src/xmalloc.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/xrealloc.c b/src/xrealloc.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/xstrcat.c b/src/xstrcat.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/xstrcatch.c b/src/xstrcatch.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/xstrdup.c b/src/xstrdup.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.27, a load balancer and fail over + * This file is part of Crosroads 1.28, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/