How to close previous SMB Connections (VCs)
Nicolas.Williams at wdr.com
Thu Mar 4 15:02:18 GMT 1999
Look through the archive.
A few weeks ago I posted our solution to this problem.
Your options are these:
- set 'keepalive' in your smb.conf to a small number of minutes
- use 'root preexec' to call a script with a number of arguments,
including the share name, the client IP address, the netbios name the
client was referring to and so on. That script should create a PID
file with the smbd's pid stored in it; the PID file should be named
after the arguments passed to the script; if the PID already exists
and the pid it contains is not stale, then kill that pid.
You can combine both approaches.
Note that setting SO_KEEPALIVE is unlikely to be helpful (or harmful) in
these situations. Fortunately the SMB protocol has a keepalive feature.
On Thu, Mar 04, 1999 at 06:37:20PM +1100, Krishna Kishore wrote:
> I have a problem with SMB core,
> I have been experimenting with an SMB client program.
> I am testing the client by connecting to a Windows95 machine
> with "SMB core" protocol.
> Everything (fileoperations etc) are going well with SMB core
> except for one problem:-
> When I restart/shutdown my SMB client machine without disconnecting
> from the windows95 machine and with some files still kept open on Win95,
> those files are not getting closed and when I try to open those files again,
> open is failing.
> I observed those files are kept open for hours together(21 and may be more).
> Is there any way in SMB Core to close all the connections opened
> previously by the SMB client after a client machine has restarted.
> Thanks in advance,
> Krishna Kishore
> D Krishna Kishore,
> Sr Software Engr,
> Plot No: 14, New Vasavi Nagar,
> Karkhana, Secunderabad 500 015.
> Tel: 040-774 2606/774 0406
> Email: kishore at trinc.com
More information about the samba-technical