summaryrefslogtreecommitdiffstats
path: root/source/web
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-04-11 07:14:12 +0000
committerAndrew Tridgell <tridge@samba.org>2000-04-11 07:14:12 +0000
commitd35bbe56bc9e3e5896b2ebdf33ff6468a0432e1f (patch)
treedb4d6274fbc345cb899c36c2f6d19035cec0b866 /source/web
parenta7b09e3e11dc66779ee50524ebe1f6687ec744c6 (diff)
downloadsamba-d35bbe56bc9e3e5896b2ebdf33ff6468a0432e1f.tar.gz
samba-d35bbe56bc9e3e5896b2ebdf33ff6468a0432e1f.tar.xz
samba-d35bbe56bc9e3e5896b2ebdf33ff6468a0432e1f.zip
two minor bugfixes for SCO UnixWare. The first is to catch SIGPIPE so that putmsg() inside their send() doesn't kill swat and the scond is to open /dev/null to replace stdin after we close that
Diffstat (limited to 'source/web')
-rw-r--r--source/web/cgi.c1
-rw-r--r--source/web/swat.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/source/web/cgi.c b/source/web/cgi.c
index 62a5e71e051..b33feb30c25 100644
--- a/source/web/cgi.c
+++ b/source/web/cgi.c
@@ -198,6 +198,7 @@ void cgi_load_variables(FILE *f1)
}
fclose(stdin);
+ open("/dev/null", O_RDWR);
if ((s=query_string) || (s=getenv("QUERY_STRING"))) {
for (tok=strtok(s,"&;");tok;tok=strtok(NULL,"&;")) {
diff --git a/source/web/swat.c b/source/web/swat.c
index 3c9858a3d38..54192b70da6 100644
--- a/source/web/swat.c
+++ b/source/web/swat.c
@@ -973,6 +973,9 @@ static void printers_page(void)
/* just in case it goes wild ... */
alarm(300);
+ /* we don't want any SIGPIPE messages */
+ BlockSignals(True,SIGPIPE);
+
dbf = sys_fopen("/dev/null", "w");
if (!dbf) dbf = stderr;