/[monit]/monit/monitor.c
ViewVC logotype

Diff of /monit/monitor.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.37 by hauk, Thu Dec 19 21:09:19 2002 UTC revision 1.38 by hauk, Sat Dec 21 01:43:36 2002 UTC
# Line 534  static void do_default() { Line 534  static void do_default() {
534   */   */
535  static void handle_options(int argc, char **argv) {  static void handle_options(int argc, char **argv) {
536        
537    int rval;    int opt;
   char opt;  
538    
539    opterr= 0;    opterr= 0;
540    
541    Run.mygroup=0;    Run.mygroup=0;
542    
543    while((rval= getopt(argc,argv,"c:d:g:l:iIvVh")) != -1) {    while((opt= getopt(argc,argv,"c:d:g:l:p:iIvVh")) != -1) {
   
     /* Bugfix: char is per default unsigned on arm, powerpc and s390 */  
     opt= (char) rval;  
544    
545      switch(opt) {      switch(opt) {
546    
# Line 572  static void handle_options(int argc, cha Line 568  static void handle_options(int argc, cha
568          Run.dolog= TRUE;          Run.dolog= TRUE;
569          break;          break;
570        
571        case 'p':
572            Run.pidfile= xstrdup(optarg);
573            break;
574    
575      case 'i':      case 'i':
576          Run.validate= TRUE;          Run.validate= TRUE;
577          break;          break;
# Line 601  static void handle_options(int argc, cha Line 601  static void handle_options(int argc, cha
601          case 'd':          case 'd':
602          case 'g':          case 'g':
603          case 'l':          case 'l':
604            case 'p':
605              error("%s: option -- %c requires an argument\n", prog, optopt);              error("%s: option -- %c requires an argument\n", prog, optopt);
606              break;              break;
607          default:          default:
# Line 629  static void help() { Line 630  static void help() {
630    printf(" -d n        Run as a daemon once per n seconds\n");    printf(" -d n        Run as a daemon once per n seconds\n");
631    printf(" -g name     Set group name for start, stop, restart and status\n");    printf(" -g name     Set group name for start, stop, restart and status\n");
632    printf(" -l logfile  Print log information to this file\n");    printf(" -l logfile  Print log information to this file\n");
633      printf(" -p pidfile  Use this lock file in daemon mode\n");
634    printf(" -i          Validate mode, startup in validate mode\n");    printf(" -i          Validate mode, startup in validate mode\n");
635    printf(" -I          Init mode, run from init\n");    printf(" -I          Init mode, run from init\n");
636    printf(" -v          Verbose mode, work noisy (diagnostic output)\n");    printf(" -v          Verbose mode, work noisy (diagnostic output)\n");

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26