projects
/
umurmur.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
6773e04
)
Add commandline switch for turning on SCHED_RR. Update version to 0.1.3
author
fatbob313
<martin@fatbob.nu>
Tue, 17 Nov 2009 21:25:24 +0000
(21:25 +0000)
committer
fatbob313
<martin@fatbob.nu>
Tue, 17 Nov 2009 21:25:24 +0000
(21:25 +0000)
src/main.c
patch
|
blob
|
history
diff --git
a/src/main.c
b/src/main.c
index 6892907142cf9eaceeb64882c501567e212a3d94..8aa6c8d4ce37fd1bbde854fa7f2cd9b4d73b9e2a 100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-46,7
+46,7
@@
#include "client.h"
#include "conf.h"
#include "client.h"
#include "conf.h"
-#define UMURMUR_VERSION "0.1.
0
"
+#define UMURMUR_VERSION "0.1.
3
"
void lockfile(const char *pidfile)
{
void lockfile(const char *pidfile)
{
@@
-124,6
+124,7
@@
void printhelp()
printf(" -d - Do not deamonize\n");
printf(" -p <pidfile> - Write PID to this file\n");
printf(" -c <conf file> - Specify configuration file\n");
printf(" -d - Do not deamonize\n");
printf(" -p <pidfile> - Write PID to this file\n");
printf(" -c <conf file> - Specify configuration file\n");
+ printf(" -r - Run with realtime priority\n");
printf(" -h - Print this help\n");
exit(0);
}
printf(" -h - Print this help\n");
exit(0);
}
@@
-131,11
+132,12
@@
void printhelp()
int main(int argc, char **argv)
{
bool_t nodaemon = false;
int main(int argc, char **argv)
{
bool_t nodaemon = false;
+ bool_t realtime = false;
char *conffile = NULL, *pidfile = NULL;
int c;
/* Arguments */
char *conffile = NULL, *pidfile = NULL;
int c;
/* Arguments */
- while ((c = getopt(argc, argv, "dp:c:h")) != EOF) {
+ while ((c = getopt(argc, argv, "d
r
p:c:h")) != EOF) {
switch(c) {
case 'c':
conffile = optarg;
switch(c) {
case 'c':
conffile = optarg;
@@
-149,6
+151,9
@@
int main(int argc, char **argv)
case 'h':
printhelp();
break;
case 'h':
printhelp();
break;
+ case 'r':
+ realtime = true;
+ break;
default:
fprintf(stderr, "Unrecognized option\n");
printhelp();
default:
fprintf(stderr, "Unrecognized option\n");
printhelp();
@@
-182,7
+187,9
@@
int main(int argc, char **argv)
Chan_init();
Client_init();
Chan_init();
Client_init();
- setscheduler();
+ if (realtime)
+ setscheduler();
+
Server_run();
SSL_deinit();
Server_run();
SSL_deinit();