LCDproc development and user support list

Text archives Help


[Lcdproc] CVS 0.5: fork improved


Chronological Thread 
  • From: joris AT robijn.net (Joris Robijn)
  • Subject: [Lcdproc] CVS 0.5: fork improved
  • Date: Wed Jul 30 20:46:01 2003

Hi,

As mentioned before I was working on the forking code. I have completed
it. (well, I think I have ;)

The server will now first fork, then start up drivers and the various
parts of the program and then inform the parent that the starup went OK
(of so). This way there is always room for outputing the errors from the
load process and the drivers using the LPT can now also fork without
problem.

A know issue that is practically unsolvable is the combination of the
following:
- you use an LPT driver and therefor start LCD as root
- you run LCDd with setuid option: user=nobody for example
- you send LCDd a SIGHUP to reload the config and drivers

In that case the process will close the LPT and try to regain access to
the LPT port, which it cannot get anymore because it is not root anymore.
This will give a fatal error.

Joris


CVS log
- Modified forking. Child will now signal parent when it has started up
OK. Only after that (or error) parent dies.
- Modified startup order of LCDd parts.
- Moved code for starting up the socket from main.c to sock.c
- Variable daemon_mode renamed to foreground_mode, consistent with
command line.
- Variable lcd_port renamed to bind_port.
- Modified the constant stay_in_foreground for drivers hd44780 and
sed1330. They don't need to stay in foreground anymore.


Checking in server/main.c;
/cvsroot/lcdproc/lcdproc/server/main.c,v <-- main.c
new revision: 1.56; previous revision: 1.55
done
Checking in server/main.h;
/cvsroot/lcdproc/lcdproc/server/main.h,v <-- main.h
new revision: 1.15; previous revision: 1.14
done
Checking in server/sock.c;
/cvsroot/lcdproc/lcdproc/server/sock.c,v <-- sock.c
new revision: 1.17; previous revision: 1.16
done
Checking in server/sock.h;
/cvsroot/lcdproc/lcdproc/server/sock.h,v <-- sock.h
new revision: 1.8; previous revision: 1.7
done
Checking in server/drivers/hd44780.c;
/cvsroot/lcdproc/lcdproc/server/drivers/hd44780.c,v <-- hd44780.c
new revision: 1.36; previous revision: 1.35
done
Checking in server/drivers/sed1330.c;
/cvsroot/lcdproc/lcdproc/server/drivers/sed1330.c,v <-- sed1330.c
new revision: 1.12; previous revision: 1.11
done

--
Joris Robijn
<joris AT robijn.net>
Mobile: 06 288 41 964

// To understand recursion, we must first understand
recursion




  • [Lcdproc] CVS 0.5: fork improved, Joris Robijn, 07/30/2003

Archive powered by MHonArc 2.6.18.

Top of page