summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2003-04-29 09:41:01 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2003-04-29 09:41:01 +0000
commit63abbdc48fb6d98530e9dabc5bab33c0912fbc45 (patch)
tree8251a7ba3837aed8958d6250abf67b8078e58256
parentdaae83a437d0d5b19b40f94d51fa5440a0aef50d (diff)
Add -autostart option
-rw-r--r--progs/tests/sample_server2.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/progs/tests/sample_server2.c b/progs/tests/sample_server2.c
index dfb80d12ec..63e3459b23 100644
--- a/progs/tests/sample_server2.c
+++ b/progs/tests/sample_server2.c
@@ -1,4 +1,4 @@
-/* $Id: sample_server2.c,v 1.1.2.3 2003/04/29 08:21:44 keithw Exp $ */
+/* $Id: sample_server2.c,v 1.1.2.4 2003/04/29 09:41:01 keithw Exp $ */
/*
* Sample server that just keeps first available window mapped.
@@ -50,6 +50,10 @@ int main( int argc, char *argv[] )
{
Display *dpy;
XEvent ev;
+ int autostart = 0;
+
+ if (argc == 2 && strcmp(argv[1], "-autostart") == 0)
+ autostart = 1;
dpy = __miniglx_StartServer(NULL);
if (!dpy) {
@@ -194,6 +198,10 @@ int main( int argc, char *argv[] )
break;
}
}
+ if (!clients && autostart) {
+ system("nohup ./texline &");
+ system("nohup ./manytex &");
+ }
}
else if (bored) {
struct client *c;