VFS and signals

Robert Dahlem Robert.Dahlem at gmx.net
Fri Oct 27 06:20:49 GMT 2000


Brad,

On Thu, 26 Oct 2000 18:13:06 -0700, Brad Sahr wrote:

>It might be handy for the VFS to be notified when smbd receives a 
>signal.
>For example, if smbd segmentation faults, this might give the VFS the
>opportunity to do some cleanup prior to the process going away. 
>It might also be handy for the VFS to reread any configuration files 
>when a SIGHUP is received, as smbd does now.

The SIGHUP case is can be done by setting some flag in the signal 
handler. Any time the VFS handler is called through one of its 
entries, it needs to check/reset that flag.

A segmentation fault is something completely different. How would you 
know SIGSEGV had not been triggered by your VFS handler? SIGSEGV 
indicates something is seriously messed up and your code should no 
longer fiddle around with possibly already destroyed data. Each line 
of code you add to your signal handling raises the chances it will 
trigger just one more SIGSEGV.

Regards,
        Robert


-- 
---------------------------------------------------------------
Robert.Dahlem at gmx.net           Fax +49-69-432647
---------------------------------------------------------------

Sent using PMMail (http://www.pmmail2000.com) - fast, decent, email
software; far better than Outlook. Try it sometime.






More information about the samba-technical mailing list