LCDproc development and user support list

Text archives Help

[Lcdproc] CVS 0.5: fork improved

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


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

A know issue that is practically unsolvable is the combination of the
- 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.


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
Checking in server/main.h;
/cvsroot/lcdproc/lcdproc/server/main.h,v <-- main.h
new revision: 1.15; previous revision: 1.14
Checking in server/sock.c;
/cvsroot/lcdproc/lcdproc/server/sock.c,v <-- sock.c
new revision: 1.17; previous revision: 1.16
Checking in server/sock.h;
/cvsroot/lcdproc/lcdproc/server/sock.h,v <-- sock.h
new revision: 1.8; previous revision: 1.7
Checking in server/drivers/hd44780.c;
/cvsroot/lcdproc/lcdproc/server/drivers/hd44780.c,v <-- hd44780.c
new revision: 1.36; previous revision: 1.35
Checking in server/drivers/sed1330.c;
/cvsroot/lcdproc/lcdproc/server/drivers/sed1330.c,v <-- sed1330.c
new revision: 1.12; previous revision: 1.11

Joris Robijn
<joris AT>
Mobile: 06 288 41 964

// To understand recursion, we must first understand

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

Archive powered by MHonArc 2.6.18.

Top of page