|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: /bin/sh on /etc/rc terminated - pipes in httpd.conf?
ax
ax-im.com
Date: Fri Aug 20 2004 - 11:59:16 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I did search marc. The threads I found, including the one you pointed
me to, didn't give me even the vaguest idea of what I might do about the
problem, thus my inquiry. When I mean I googled, I mean I searched all
the documentation I know about, for days even.
Thanks for your very specific suggestion. I tried it, but
unfortunately, on boot or manual invocation it does exactly the same
thing -- the piped logs terminate, and rc freaks out.
#### LATE-BREAKING UPDATE ####
Just received a couple more messages while I was typing this, with more
suggestions, and y'all have the benefit of me sitting here with my back
to the wall trying anything I can in real time to get this beast up and
running, and...
Upshot: THIS WOULD APPEAR TO HAVE HIT THE SPOT!! I made the latest
suggested changes (see below), tried them out, rebooted, and didn't have
to do a damned thing to salvage the situation. I most definitely owe
you a beer or thirty, Dan Hartnett.
...Which leads to my next peripheral question... How could I have
discovered this by myself? I'm not yet an expert, clearly, but I'm
struggling in that direction (at least I found the problem), and I've
made great strides in the past couple of weeks by following the lists &
devouring all other documentation, and I've scanned several books, but
from what I know now to a fix like the one suggested is a big jump.
What's the shortest distance between these two points?
Thanks for all assistance!
Alex Fordyce
ax
ax-im.com
> Quoth danh
nfol.com (Dan Harnett),
> Friday, August 20, 2004 9:17 am -0400...
> Actually, the patch I posted still had a chance of failure if the
> subshell died before apache sent the signal. This should fix it.
Index: rc
===================================================================
RCS file: /cvs/src/etc/rc,v
retrieving revision 1.250
diff -u -p -r1.250 rc
--- rc 7 Aug 2004 00:50:25 -0000 1.250
+++ rc 20 Aug 2004 16:09:52 -0000

-26,9 +26,9 
stripcom() {
stty status '^T'
-# Set shell to ignore SIGINT (2), but not children;
+# Set shell to ignore SIGINT (2) and SIGTERM (15), but not children;
# shell catches SIGQUIT (3) and returns to single user after fsck.
-trap : 2
+trap : 2 15
trap : 3 # shouldn't be needed
HOME=/; export HOME

-537,7 +537,7 
fi
if [ "X${httpd_flags}" != X"NO" ]; then
# Clean up left-over httpd locks
rm -f /var/www/logs/{ssl_mutex,httpd.lock,accept.lock}.*
- echo -n ' httpd'; /usr/sbin/httpd ${httpd_flags}
+ echo -n ' httpd'; ( /usr/sbin/httpd ${httpd_flags} )
fi
if [ "X${ftpd_flags}" != X"NO" ]; then
> ---
> Quoth danh
nfol.com (Dan Harnett),
> Friday, August 20, 2004 6:08 am -0400...
> On Fri, Aug 20, 2004 at 01:57:11AM -0700, ax
ax-im.com wrote:
> > The only google result which seemed even vaguely similar to mine
> > (http://monkey.org/openbsd/archive/misc/0109/msg00584.html)
exhibited
> > one thing in common -- he was also using pipes in his log rotation,
> > although he was using rotatelogs. Nobody who replied suggested this
as
> > a possible culprit.
>
> I highly recommend using marc.theaimsgroup.com for searching mailing
> list archives.
>
> http://marc.theaimsgroup.com/?l=openbsd-misc&m=109097594100085&w=2
>
> There is even a PR open.
>
> A quick workaround is to trap SIGTERM in /etc/rc.local if httpd is
> started.
>
> Index: rc
> ===================================================================
> RCS file: /cvs/src/etc/rc,v
> retrieving revision 1.250
> diff -u -p -r1.250 rc
> --- rc 7 Aug 2004 00:50:25 -0000 1.250
> +++ rc 20 Aug 2004 13:05:35 -0000
> 
-537,7 +537,7 
fi
> if [ "X${httpd_flags}" != X"NO" ]; then
> # Clean up left-over httpd locks
> rm -f /var/www/logs/{ssl_mutex,httpd.lock,accept.lock}.*
> - echo -n ' httpd'; /usr/sbin/httpd ${httpd_flags}
> + echo -n ' httpd'; ( trap : 15; /usr/sbin/httpd ${httpd_flags}
)
> fi
>
> if [ "X${ftpd_flags}" != X"NO" ]; then
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]