Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 1462

Summary: /etc/init.d/gpm does not properly handle if gpm doesn't start
Product: Gentoo Linux Reporter: Jared H. Hudson <gentoo>
Component: [OLD] Core systemAssignee: Michael M Nazaroff (RETIRED) <naz>
Status: RESOLVED INVALID    
Severity: normal    
Priority: High    
Version: 1.0 RC6 r14   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jared H. Hudson 2002-04-01 19:01:46 UTC
If gpm doesn't start properly, like for example if it can't open the mouse
device it starts for a moment, forks a process, prints a error mesage and exits
with status 0. The problem is, twofold, first it leaves /var/run/gpm.pid with a
pid that has exited (gpm's fault here) and 2nd, since it exits with a status of
0, start-stop-daemon thinks it started ok, and says [OK].

Suggestion:

Find an appropiate way (maybe via pidof) to determine if it did start and it
it's pid matches the in /var/run/gpm.pid
Comment 1 Roman Majer 2002-06-04 13:19:50 UTC
It's relative (I think) with bug ID 3297.
There could be some "clever" mechanism for doing with PIDs in rc
scripts.

if "start" is called
 a) look in /mnt/.init.d/started if I'm running
 b) look for pid
 c) look, if process of this pid is working
with combination of this information do the start
 a) say-> I'm running, if (a && b && c = true)
 b) start if (a && b && c = false)
 for b) do cleaning dependant on a || b || c

|| -> logical OR
&& -> logical AND

Martin Schlemmer is working on it, I hope :-))
Comment 2 Michael M Nazaroff (RETIRED) gentoo-dev 2002-08-23 11:34:13 UTC
I will take a look at gpm code, I've been so busy as of late haven't had much
chance to take a look at stuff.

We can probably just patch gpm to handle this correctly maybe?

Might be the easiest.

Naz
Comment 3 Michael M Nazaroff (RETIRED) gentoo-dev 2002-11-12 03:22:49 UTC
new init scripts handle this.. out dated bug