aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README9
-rw-r--r--lcd4linux.c43
2 files changed, 41 insertions, 11 deletions
diff --git a/README b/README
index 7e5312a..2000a02 100644
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
#
-# $Id: README,v 1.7 2000/08/09 09:50:29 reinelt Exp $
+# $Id: README,v 1.8 2000/08/09 14:14:11 reinelt Exp $
#
This is the README file for lcd4linux
@@ -25,13 +25,14 @@ list available drivers
lcd4linux -d
calibrate delay loop (necessary for some drivers)
-lcd4linux [-c key=val] [-f config-file] [-o output] [-q] [-v]
+lcd4linux [-c key=val] [-F] [-f config-file] [-o output] [-q] [-v]
run lcd4linux
-generate debugging messages with '-v'
+overwrite entries from the config-file with '-c'
+do not fork and detach with '-F'
use configuration from 'config-file' instead of /etc/lcd4linux.conf
write picture to 'output' (raster driver only)
-overwrite entries from the config-file with '-c'
suppress startup splash screen with '-q'
+generate debugging messages with '-v' (implies -F)
SUPPORTED DISPLAYS
diff --git a/lcd4linux.c b/lcd4linux.c
index 0d49202..3236937 100644
--- a/lcd4linux.c
+++ b/lcd4linux.c
@@ -1,4 +1,4 @@
-/* $Id: lcd4linux.c,v 1.24 2000/08/09 09:50:29 reinelt Exp $
+/* $Id: lcd4linux.c,v 1.25 2000/08/09 14:14:11 reinelt Exp $
*
* LCD4Linux
*
@@ -20,6 +20,11 @@
*
*
* $Log: lcd4linux.c,v $
+ * Revision 1.25 2000/08/09 14:14:11 reinelt
+ *
+ * new switch -F (do not fork)
+ * added automatic forking if -F not specified
+ *
* Revision 1.24 2000/08/09 09:50:29 reinelt
*
* opened 0.98 development
@@ -163,7 +168,7 @@ static void usage(void)
printf ("usage: lcd4linux [-h]\n");
printf (" lcd4linux [-l]\n");
printf (" lcd4linux [-d]\n");
- printf (" lcd4linux [-c key=value] [-f config-file] [-o output-file] [-q] [-v]\n");
+ printf (" lcd4linux [-c key=value] [-F] [-f config-file] [-o output-file] [-q] [-v]\n");
}
int hello (void)
@@ -229,9 +234,10 @@ int main (int argc, char *argv[])
char *cfg="/etc/lcd4linux.conf";
char *driver;
int c, smooth;
+ int foreground=0;
int quiet=0;
-
- while ((c=getopt (argc, argv, "c:df:hlo:qv"))!=EOF) {
+
+ while ((c=getopt (argc, argv, "c:dFf:hlo:qv"))!=EOF) {
switch (c) {
case 'c':
if (cfg_cmd (optarg)<0) {
@@ -242,6 +248,12 @@ int main (int argc, char *argv[])
case 'd':
calibrate();
exit(0);
+ case 'F':
+ foreground++;
+ break;
+ case 'f':
+ cfg=optarg;
+ break;
case 'h':
usage();
exit(0);
@@ -249,9 +261,6 @@ int main (int argc, char *argv[])
printf ("%s\n", release);
lcd_list();
exit(0);
- case 'f':
- cfg=optarg;
- break;
case 'o':
output=optarg;
break;
@@ -260,6 +269,7 @@ int main (int argc, char *argv[])
break;
case 'v':
debugging++;
+ foreground++;
break;
default:
exit(2);
@@ -271,6 +281,25 @@ int main (int argc, char *argv[])
exit(2);
}
+ if (!foreground) {
+ pid_t i;
+ // debugging does not make sense here
+ // because -v implies -F which sets foreground=1
+ // debug ("going background...\n");
+ i=fork();
+ if (i<0) {
+ perror ("fork() failed");
+ exit (1);
+ }
+ printf ("fork() returned %d\n", i);
+ if (i!=0)
+ exit (0);
+ close (0);
+ close (1);
+ printf ("Hallo stdout\n");
+ fprintf (stderr, "Hallo stderr\n");
+ }
+
debug ("LCD4Linux " VERSION "\n");
// set default values
2014-10-15d/control: update Standards Version to 3.9.6Jonathan McCrohan2-1/+3 2014-10-15d/control: add Build-Depends on dvb-toolsJonathan McCrohan2-1/+2 2014-10-15New Upstream Snapshot (commit d26b627)Jonathan McCrohan1-0/+10 2014-10-15Imported Upstream version 0+git20141009.d26b627upstream/0+git20141009.d26b627Jonathan McCrohan2010-11120/+159271 2014-07-23Release 0+git20140611.14bd6c7-1debian/0+git20140611.14bd6c7-1Jonathan McCrohan1-2/+2 2014-07-23New Upstream Snapshot (commit 14bd6c7)Jonathan McCrohan1-2/+3 2014-07-23Imported Upstream version 0+git20140611.14bd6c7upstream/0+git20140611.14bd6c7Jonathan McCrohan7-11/+60 2014-05-13New Upstream Snapshot (commit 1246b27)Jonathan McCrohan1-0/+6 2014-05-13Imported Upstream version 0+git20140512.1246b27upstream/0+git20140512.1246b27Jonathan McCrohan391-301/+3983 2014-04-05Release 0+git20140326.cfc2975-1debian/0+git20140326.cfc2975-1Jonathan McCrohan1-2/+2 2014-04-05d/control: update Homepage (upstream has moved from Gitweb to cgit)Jonathan McCrohan2-1/+2 2014-04-05New Upstream Snapshot (commit cfc2975)Jonathan McCrohan1-0/+6 2014-04-05Imported Upstream version 0+git20140326.cfc2975upstream/0+git20140326.cfc2975Jonathan McCrohan118-656/+877 2014-01-16Release 0+git20140107.1850cf8-1debian/0+git20140107.1850cf8-1Jonathan McCrohan1-2/+2 2014-01-16Update Standards Version to 3.9.5Jonathan McCrohan2-1/+9 No changes required