.pid files

Mike Black mblack at csihq.com
Thu Jul 2 10:55:47 GMT 1998


#1 - Just upgraded a server to the new ntdom code
#2 - Just had a system lockup -- had to do a hard reset
#3 - Samba says:
    ERROR: nmbd is already running
#4 - Trace shows:
    open("/usr/local/samba/var/locks/nmbd.pid", O_RDONLY) = 4
    fstat(4, {st_mode=S_IFREG|0644, st_size=20, ...}) = 0
    mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|0x20, 4294967295, 0) =
0x40008000
    read(4, "106\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 20
    close(4)                                = 0
    munmap(0x40008000, 4096)                = 0
    kill(106, SIGNULL)                      = 0
    kill(106, SIGNULL)                      = 0
    write(3, "ERROR: nmbd is already running\n"..., 31) = 31
#5 - Removed .pid files and all is fine

Shouldn't the error message be:

ERROR: Lock file '/usr/local/samba/var/locks/nmbd.pid' exists -- improper
shutdown?
Do you want to start anyway (y or n)?

And...shouldn't the error show up on the console (as it is EXTREMELY
severe)??

It would be nice if it offered to continue and overwrite the pid file
anyway.  But, at LEAST give a good error message please!!  Actually, it
would probably be better for a command line switch to FORCE overwriting
(like during the boot process).  I've added an "rm" to my startup script to
fix this for now...

This reminds me of one my favorite pet peeves -- "Error opening file (or
DLL)" -- prompting the questions "What file(DLL)?" and "Why"...

_________________________________________________________
Mike Black                            mblack at csihq.com
407-676-2923, x203                    FAX 407-676-2355
Computer Science Innovations, Inc.    http://www.csihq.com





More information about the samba-ntdom mailing list