[nos-bbs] removing stale tty lock files

Maiko Langelaar maiko at pcs.mb.ca
Fri Feb 25 13:43:30 EST 2011


> So, it seems that JNOS is smart enough to remove lock files.

Except for the one time you ran into.

JNOS removes lock files only if it cannot find the process id
of the process that created those lock files (ie, a previous
instance of JNOS running before or much earlier than that).

>From the kill man pages :

  Note that an existing process might be a zombie, a process which
  already committed termination, but has not yet been wait()ed for.

It does happen, perhaps your previous instance of JNOS became a
zombie, and as a result the new instance saw that the PID used to
create those lock files was still in existance, so it left them.

Other unlikely but not discountable scenarios ?

   The contents of the lock file were corrupted somehow

   The lock file was not able to be opened as read only, mind
   you JNOS could go into an infinite 100% cpu loop in that case,
   in which case perhaps I need to look at more *modern* locking
   code, but that's a very minor sidenote, and not relevant here
   I think. If it was, I'd be hearing from alot more users.

Anyways, hope that helps.

Maiko





More information about the nos-bbs mailing list