Another showstopper in 2.2.5
ohrn at chl.chalmers.se
Tue Aug 20 11:08:01 GMT 2002
On Tue, 20 Aug 2002, Tom Jansen wrote:
> > > > Sooner or later the smbd dies on a SIGPIPE when trying to send a
> > > > keepalive. The SIGPIPE isn't catched, thus it leaves stale sharemodes.
> > After getting a hint on signalhandling I put a BlockSignals call into
> > send_keepalive.
> > --- lib/util_sock.c.org Tue Aug 20 12:31:58 2002
> > +++ lib/util_sock.c Tue Aug 20 12:33:15 2002
> > @@ -401,6 +401,7 @@
> > buf = 0x85;
> > buf = buf = buf = 0;
> > + BlockSignals(True,SIGPIPE);
> > return(write_socket_data(client,(char *)buf,4) == 4);
> > }
> What about unblocking ?
Well, since there's no signal handler for SIGPIPE you might just end up
with death by SIGPIPE somewhere else in the code instead.
I guess the proper thing to do is to globally block SIGPIPE at startup
and assume that all calls to read()/write() properly handles the case of
failure with EPIPE.
"It is easy to be blinded to the essential uselessness of computers by
the sense of accomplishment you get from getting them to work at all."
- Douglas Adams
Fredrik Öhrn Chalmers University of Technology
ohrn at chl.chalmers.se Sweden
More information about the samba-technical