-.\" $OpenBSD: slowcgi.8,v 1.14 2018/08/13 16:54:50 florian Exp $
+.\" $OpenBSD: slowcgi.8,v 1.15 2021/09/02 13:18:04 florian Exp $
.\"
.\" Copyright (c) 2013 Florian Obser <florian@openbsd.org>
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: August 13 2018 $
+.Dd $Mdocdate: September 2 2021 $
.Dt SLOWCGI 8
.Os
.Sh NAME
.Op Fl s Ar socket
.Op Fl U Ar user
.Op Fl u Ar user
+.Op Fl v
.Sh DESCRIPTION
.Nm
is a server which implements the FastCGI Protocol to execute CGI scripts.
to
the home directory of
.Ar user .
+.It Fl v
+Enable more verbose (debug) logging.
.El
.Sh SEE ALSO
.Xr httpd 8
-/* $OpenBSD: slowcgi.c,v 1.60 2021/04/20 07:35:42 claudio Exp $ */
+/* $OpenBSD: slowcgi.c,v 1.61 2021/09/02 13:18:04 florian Exp $ */
/*
* Copyright (c) 2013 David Gwynne <dlg@openbsd.org>
* Copyright (c) 2013 Florian Obser <florian@openbsd.org>
struct timeval timeout = { TIMEOUT_DEFAULT, 0 };
struct slowcgi_proc slowcgi_proc;
int debug = 0;
+int verbose = 0;
int on = 1;
char *fcgi_socket = "/var/www/run/slowcgi.sock";
}
}
- while ((c = getopt(argc, argv, "dp:s:U:u:")) != -1) {
+ while ((c = getopt(argc, argv, "dp:s:U:u:v")) != -1) {
switch (c) {
case 'd':
debug++;
case 'u':
slowcgi_user = optarg;
break;
+ case 'v':
+ verbose++;
+ break;
default:
usage();
/* NOTREACHED */
void
syslog_debug(const char *fmt, ...)
{
- va_list ap;
-
- va_start(ap, fmt);
- vsyslog(LOG_DEBUG, fmt, ap);
- va_end(ap);
+ if (verbose > 0) {
+ va_list ap;
+ va_start(ap, fmt);
+ vsyslog(LOG_DEBUG, fmt, ap);
+ va_end(ap);
+ }
}