| version 1.1, 2002/05/28 16:01:41 |
version 1.2, 2002/05/29 15:09:17 |
|
|
| /* $Id$ */ |
/* $Id$ */ |
| |
|
| #include <stdio.h> |
#include <stdio.h> |
| |
#include <unistd.h> |
| #include <errno.h> |
#include <errno.h> |
| #include <sys/resource.h> |
#include <sys/resource.h> |
| |
|
| Line 68 int main(int argc, char **argv) |
|
| Line 69 int main(int argc, char **argv) |
|
| ret = cfg_parse(con); |
ret = cfg_parse(con); |
| |
|
| if (ret != CFG_OK) { |
if (ret != CFG_OK) { |
| |
printf("error parsing command line: "); |
| cfg_fprint_error(con, stdout); |
cfg_fprint_error(con, stdout); |
| putchar('\n'); |
putchar('\n'); |
| |
|
| return ret < 0 ? -ret : ret; |
return ret < 0 ? -ret : ret; |
| } |
} |
| |
|
| Line 91 int main(int argc, char **argv) |
|
| Line 92 int main(int argc, char **argv) |
|
| return 1; |
return 1; |
| } |
} |
| |
|
| |
/* Config file testing */ |
| |
if (cfg_file != NULL) { |
| |
cfg_set_cfgfile_context(con, 0, 0, cfg_file); |
| |
|
| |
/* Parsing config line */ |
| |
ret = cfg_parse(con); |
| |
|
| |
if (ret != CFG_OK) { |
| |
printf("error parsing config file: "); |
| |
cfg_fprint_error(con, stdout); |
| |
putchar('\n'); |
| |
return ret < 0 ? -ret : ret; |
| |
} |
| |
} |
| |
|
| /* Testing if command to run was specified */ |
/* Testing if command to run was specified */ |
| if (command == NULL) { |
if (command == NULL) { |
| puts("error: you must specify program to run"); |
puts("error: you must specify program to run"); |
| Line 106 int main(int argc, char **argv) |
|
| Line 122 int main(int argc, char **argv) |
|
| printf("warning: unable to set priority (nice) to %d\n", nice); |
printf("warning: unable to set priority (nice) to %d\n", nice); |
| } |
} |
| |
|
| |
/* Verbose running info */ |
| |
if (verbose) { |
| |
register int i; |
| |
printf("info: running"); |
| |
for (i = 0; command[i] != NULL; i++) |
| |
printf("[%s]", command[i]); |
| |
putchar('\n'); |
| |
} |
| |
|
| execvp(command[0], command); |
execvp(command[0], command); |
| |
|
| perror("error running program"); |
perror("error running program"); |
| Line 118 int main(int argc, char **argv) |
|
| Line 143 int main(int argc, char **argv) |
|
| * vim600:fdm=marker fdl=0 fdc=0: |
* vim600:fdm=marker fdl=0 fdc=0: |
| * }}} */ |
* }}} */ |
| |
|
| |
|