aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreinelt <>2003-08-14 03:47:40 +0000
committerreinelt <>2003-08-14 03:47:40 +0000
commit08f1734a56cce3ab7aa764d4e9ba5da2cb856df3 (patch)
tree033346d6bb263c1d3f6a5d04bb5038e239a871d1
parent3a86e6f409ad2d6094aacf4b2c0f991d52fc4108 (diff)
downloadlcd4linux-08f1734a56cce3ab7aa764d4e9ba5da2cb856df3.tar.gz
[lcd4linux @ 2003-08-14 03:47:40 by reinelt]
remove PID file if driver initialisation fails
-rw-r--r--cfg.c9
-rw-r--r--lcd4linux.c6
2 files changed, 11 insertions, 4 deletions
diff --git a/cfg.c b/cfg.c
index 06841a6..6fd6e07 100644
--- a/cfg.c
+++ b/cfg.c
@@ -1,4 +1,4 @@
-/* $Id: cfg.c,v 1.13 2003/02/22 07:53:10 reinelt Exp $
+/* $Id: cfg.c,v 1.14 2003/08/14 03:47:40 reinelt Exp $
*
* config file stuff
*
@@ -20,6 +20,9 @@
*
*
* $Log: cfg.c,v $
+ * Revision 1.14 2003/08/14 03:47:40 reinelt
+ * remove PID file if driver initialisation fails
+ *
* Revision 1.13 2003/02/22 07:53:10 reinelt
* cfg_get(key,defval)
*
@@ -273,13 +276,13 @@ int cfg_read (char *file)
if (check_cfg_file(file) == -1) {
error("config file '%s' is insecure, aborting", file);
- exit(2);
+ return -1;
}
stream=fopen (file, "r");
if (stream==NULL) {
error ("open(%s) failed: %s", file, strerror(errno));
- return-1;
+ return -1;
}
if (Config_File) free (Config_File);
diff --git a/lcd4linux.c b/lcd4linux.c
index 6a357f7..ee44cb5 100644
--- a/lcd4linux.c
+++ b/lcd4linux.c
@@ -1,4 +1,4 @@
-/* $Id: lcd4linux.c,v 1.41 2003/08/08 08:05:23 reinelt Exp $
+/* $Id: lcd4linux.c,v 1.42 2003/08/14 03:47:40 reinelt Exp $
*
* LCD4Linux
*
@@ -20,6 +20,9 @@
*
*
* $Log: lcd4linux.c,v $
+ * Revision 1.42 2003/08/14 03:47:40 reinelt
+ * remove PID file if driver initialisation fails
+ *
* Revision 1.41 2003/08/08 08:05:23 reinelt
* added PID file handling
*
@@ -447,6 +450,7 @@ int main (int argc, char *argv[])
debug ("initializing driver %s", driver);
if (lcd_init(driver)==-1) {
+ pid_exit(PIDFILE);
exit (1);
}
194ee035c6cafdc5102092b7b422541aeab&follow=1'>[lcd4linux @ 2004-01-11 18:26:02 by reinelt]reinelt10-79/+158 further widget and layout processing git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@306 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-11[lcd4linux @ 2004-01-11 09:26:15 by reinelt]reinelt4-19/+67 layout starts to exist... git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@305 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-10[lcd4linux @ 2004-01-10 20:22:33 by reinelt]reinelt13-210/+554 added new function 'cfg_list()' (not finished yet) added layout.c (will replace processor.c someday) added widget_text.c (will be the first and most important widget) modified lcd4linux.c so that old-style configs should work, too git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@304 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-10[lcd4linux @ 2004-01-10 17:45:26 by reinelt]reinelt2-5/+15 changed initialization order so cfg() gets initialized before plugins. This way a plugin's init() can use cfg_get(). Thanks to Xavier for reporting this one! git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@303 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-10[lcd4linux @ 2004-01-10 17:36:56 by reinelt]reinelt4-10/+207 I2C Sensors plugin from Xavier added git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@302 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-10[lcd4linux @ 2004-01-10 17:34:40 by reinelt]reinelt3-176/+138 further matrixOrbital changes widgets initialized git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@301 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-10[lcd4linux @ 2004-01-10 10:20:22 by reinelt]reinelt2-14/+605 new MatrixOrbital changes git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@300 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-09[lcd4linux @ 2004-01-09 17:03:06 by reinelt]reinelt10-51/+420 initiated transfer to new driver architecture new file 'drv.c' will someday replace 'display.c' new file 'drv_MatrixOrbital.c' will replace 'MatrixOrbital.c' due to this 'soft' transfer lcd4linux should stay usable during the switch (at least I hope so) git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@299 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-09[lcd4linux @ 2004-01-09 04:16:06 by reinelt]reinelt28-193/+332 added 'section' argument to cfg_get(), but NULLed it on all calls by now. git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@298 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-08[lcd4linux @ 2004-01-08 06:00:28 by reinelt]reinelt1-8/+14 allowed '.' in key names allowed empty group keys (not only "group anything {", but "anything {") git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@297 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-08[lcd4linux @ 2004-01-08 05:28:12 by reinelt]reinelt3-42/+198 Luk Claes added to AUTHORS cfg: group handling ('{}') added git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@296 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-07[lcd4linux @ 2004-01-07 10:15:41 by reinelt]reinelt4-184/+436 small glitch in evaluator fixed made config table sorted and access with bsearch(), which should be much faster git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@295 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-06[lcd4linux @ 2004-01-06 23:01:37 by reinelt]reinelt3-4/+7 more copyright issues git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@294 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-06[lcd4linux @ 2004-01-06 22:33:13 by reinelt]reinelt14-472/+542 Copyright statements cleaned up git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@293 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-06[lcd4linux @ 2004-01-06 21:14:51 by reinelt]reinelt4-14/+7 more debianizing git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@292 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-06[lcd4linux @ 2004-01-06 18:22:41 by reinelt]reinelt1-3/+13 debian updates git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@291 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-06[lcd4linux @ 2004-01-06 17:56:43 by reinelt]reinelt3-1000/+2045 autotools update git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@290 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-06[lcd4linux @ 2004-01-06 17:37:00 by reinelt]reinelt1-0/+20 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@289 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-06[lcd4linux @ 2004-01-06 17:33:45 by reinelt]reinelt6-28/+298 Evaluator: functions with variable argument lists Evaluator: plugin_sample.c and README.Plugins added git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@288 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-06[lcd4linux @ 2004-01-06 15:19:12 by reinelt]reinelt2-104/+136 Evaluator rearrangements... git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@287 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-05[lcd4linux @ 2004-01-05 11:57:38 by reinelt]reinelt7-8/+168 added %y tokens to make the Evaluator useable git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@286 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-02[lcd4linux @ 2004-01-02 14:20:15 by reinelt]reinelt10-0/+201 debianization added git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@285 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-02[lcd4linux @ 2004-01-02 14:18:54 by reinelt]reinelt2-0/+101 Changelog, TODO updated git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@284 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2003-12-19[lcd4linux @ 2003-12-19 06:27:33 by reinelt]reinelt4-8/+119 added XMMS plugin from Markus Keil git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@283 3ae390bd-cb1e-0410-b409-cd5a39f66f1f