/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to plugin-runner.c

Tags: version-1.0.5-1
* Makefile (version): Changed to "1.0.5".
* NEWS (1.0.5): New entry.
* debian/changelog (1.0.5-1): - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
    }
121
121
  }
122
122
  
123
 
  *new_plugin = (plugin){ .name = copy_name,
124
 
                          .argc = 1,
125
 
                          .disabled = false,
126
 
                          .next = plugin_list };
 
123
  *new_plugin = (plugin) { .name = copy_name,
 
124
                           .argc = 1,
 
125
                           .disabled = false,
 
126
                           .next = plugin_list };
127
127
  
128
128
  new_plugin->argv = malloc(sizeof(char *) * 2);
129
129
  if(new_plugin->argv == NULL){
232
232
      break;
233
233
    }
234
234
    if(pid == -1){
235
 
      if(errno == ECHILD){
236
 
        /* No child processes */
237
 
        break;
 
235
      if(errno != ECHILD){
 
236
        perror("waitpid");
238
237
      }
239
 
      perror("waitpid");
 
238
      /* No child processes */
 
239
      break;
240
240
    }
241
241
    
242
242
    /* A child exited, find it in process_list */
376
376
  };
377
377
  
378
378
  error_t parse_opt(int key, char *arg, __attribute__((unused))
379
 
                    struct argp_state *state){
380
 
    switch(key){
 
379
                    struct argp_state *state) {
 
380
    switch(key) {
381
381
    case 'g':                   /* --global-options */
382
382
      if(arg != NULL){
383
383
        char *p;
512
512
     ignores everything but the --config-file option. */
513
513
  error_t parse_opt_config_file(int key, char *arg,
514
514
                                __attribute__((unused))
515
 
                                struct argp_state *state){
516
 
    switch(key){
 
515
                                struct argp_state *state) {
 
516
    switch(key) {
517
517
    case 'g':                   /* --global-options */
518
518
    case 'G':                   /* --global-env */
519
519
    case 'o':                   /* --options-for */
970
970
              fprintf(stderr, "Plugin %" PRIdMAX " exited with status"
971
971
                      " %d\n", (intmax_t) (proc->pid),
972
972
                      WEXITSTATUS(proc->status));
973
 
            } else if(WIFSIGNALED(proc->status)){
 
973
            } else if(WIFSIGNALED(proc->status)) {
974
974
              fprintf(stderr, "Plugin %" PRIdMAX " killed by signal"
975
975
                      " %d\n", (intmax_t) (proc->pid),
976
976
                      WTERMSIG(proc->status));