[gpm]stale pid file
Nico Schottelius
nicos-mutt@pcsystems.de
Sun, 2 Jun 2002 12:29:11 +0200
--DHdTHwZuIuFUI+Ax
Content-Type: multipart/mixed; boundary="Lg8eXa+brxrbjAbR"
Content-Disposition: inline
--Lg8eXa+brxrbjAbR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Jamie Zawinski [Sun, May 26, 2002 at 03:01:12AM -0700]:
> gpm lets its pid file get stale, and trusts it too much:
>=20
> % killall gpm
> % gpm ... &
> oops(): [/usr/local/src/gpm-1.20.0/src/gpn.c(195)]:=20
> gpm is already running as pid 9766
hmm...this never ever happened here and I am currently trying to find out
why.
I attached a test and it seems to be a problem of the -D (ebug) switch.
But I am not sure, because I had not enough time to test.
Nico
--=20
Nico Schottelius
Please send your messages pgp-signed or pgp-encrypted.
If you don't know what pgp is visit www.gnupg.org.
(public pgp key: ftp.schottelius.org/pub/familiy/nico/pgp-key)
--Lg8eXa+brxrbjAbR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=gpm-nobug
Content-Transfer-Encoding: quoted-printable
Start & Restart gpm with killall
flapp:~ # killall gpm
flapp:~ # gpm -v
gpm 1.20.1, Thu Oct 4 00:21:21 CEST 2001
flapp:~ # gpm -t ps2 -m /dev/misc/psaux
flapp:~ # killall gpm
flapp:~ # gpm -t ps2 -m /dev/misc/psaux
--> no problem at all
----------------- snip 1 -----------------------------
Start & Restart gpm with killall in debug mode
flapp:~ # killall gpm
flapp:~ # gpm -t ps2 -m /dev/misc/psaux -D &
[...]
flapp:~ # killall gpm
*** debug ***: [gpm.c(903)]:
Removing files /var/run/gpm.pid and /dev/gpmctl
[1]+ Done gpm -t ps2 -m /dev/misc/psaux -D
flapp:~ # gpm -t ps2 -m /dev/misc/psaux
flapp:~ # ls /dev/gpm* /var/run/gpm*
/dev/gpmctl /var/run/gpm.pid
--> files are not deleted in debug mode...
----------------- snip 2 -----------------------------
Stop gpm and see what files are left:
flapp:~ # killall gpm
flapp:~ # gpm -m /dev/misc/psaux -t ps2
flapp:~ # ls /dev/gpmctl=20
/dev/gpmctl
flapp:~ # killall gpm
flapp:~ # ls /dev/gpmctl=20
ls: /dev/gpmctl: No such file or directory
flapp:~ # ls /var/run/gpm*
ls: /var/run/gpm*: No such file or directory
--> just fine
--Lg8eXa+brxrbjAbR--
--DHdTHwZuIuFUI+Ax
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Weitere Infos: siehe http://www.gnupg.org
iD8DBQE8+fN3tnlUggLJsX0RAsG1AJ9UxvITnX+yY32xN689LLtOWn5i6QCcDxxy
gW5ch3V2CHhA9dPKIlGkpFg=
=nvNL
-----END PGP SIGNATURE-----
--DHdTHwZuIuFUI+Ax--