FreeCalypso > hg > freecalypso-tools
comparison rvinterf/lowlevel/rvifmain.c @ 581:d43dc6dfb44c
-P option added to rvinterf
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 02 Feb 2020 22:23:17 +0000 |
parents | a626f0ef542a |
children | 32031c18cc25 |
comparison
equal
deleted
inserted
replaced
580:ca28592b0b34 | 581:d43dc6dfb44c |
---|---|
47 extern int optind; | 47 extern int optind; |
48 int c; | 48 int c; |
49 fd_set fds; | 49 fd_set fds; |
50 struct client *cli, **clip; | 50 struct client *cli, **clip; |
51 | 51 |
52 while ((c = getopt(argc, argv, "bB:d:l:ns:S:w:X:")) != EOF) | 52 while ((c = getopt(argc, argv, "bB:d:l:nP:s:S:w:X:")) != EOF) |
53 switch (c) { | 53 switch (c) { |
54 case 'b': | 54 case 'b': |
55 background++; | 55 background++; |
56 /* FALL THRU */ | 56 /* FALL THRU */ |
57 case 'n': | 57 case 'n': |
63 case 'd': | 63 case 'd': |
64 target_fd = atoi(optarg); | 64 target_fd = atoi(optarg); |
65 continue; | 65 continue; |
66 case 'l': | 66 case 'l': |
67 logfname = optarg; | 67 logfname = optarg; |
68 continue; | |
69 case 'P': | |
70 if (find_bootctrl_entry(optarg) < 0) | |
71 exit(1); /* error msg already printed */ | |
68 continue; | 72 continue; |
69 case 's': | 73 case 's': |
70 socket_pathname = optarg; | 74 socket_pathname = optarg; |
71 continue; | 75 continue; |
72 case 'S': | 76 case 'S': |
119 printf("rvinterf forked into background (pid %d)\n", c); | 123 printf("rvinterf forked into background (pid %d)\n", c); |
120 exit(0); | 124 exit(0); |
121 } | 125 } |
122 } | 126 } |
123 signal(SIGPIPE, SIG_IGN); | 127 signal(SIGPIPE, SIG_IGN); |
128 pwon_if_needed(); | |
124 for (;;) { | 129 for (;;) { |
125 FD_ZERO(&fds); | 130 FD_ZERO(&fds); |
126 FD_SET(target_fd, &fds); | 131 FD_SET(target_fd, &fds); |
127 if (listener) | 132 if (listener) |
128 FD_SET(listener, &fds); | 133 FD_SET(listener, &fds); |