[gpm]stale pid file

Jamie Zawinski jwz@jwz.org
Sun, 26 May 2002 03:01:12 -0700


gpm lets its pid file get stale, and trusts it too much:

  % killall gpm
  % gpm ... &
  oops(): [/usr/local/src/gpm-1.20.0/src/gpn.c(195)]: 
  gpm is already running as pid 9766

That's not true, there is no process 9766.  Two bugs here: first, if gpm
is going to use a lock file, it ought to intercept SIGTERM to clean up;
second, before claiming that gpm is already running, it ought to at
least send a signal 0 to that pid to see if there even is such a pid...

-- 
Jamie Zawinski
jwz@jwz.org             http://www.jwz.org/
jwz@dnalounge.com       http://www.dnalounge.com/