/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

  • Committer: Teddy Hogeborn
  • Date: 2009-02-05 02:33:05 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090205023305-o7rkhr55e7w4pe1m
* plugins.d/password-prompt.c (quit_now): Changed type to "volatile
                             sig_atomic_t".  All uses changed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
  size_t buffer_size;
90
90
  size_t buffer_length;
91
91
  bool eof;
92
 
  volatile sig_atomic_t completed;
93
 
  int status;
 
92
  volatile bool completed;
 
93
  volatile int status;
94
94
  struct plugin *next;
95
95
} plugin;
96
96
 
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 */
248
248
      continue;
249
249
    }
250
250
    proc->status = status;
251
 
    proc->completed = 1;
 
251
    proc->completed = true;
252
252
  }
253
253
}
254
254
 
959
959
       from one of them */
960
960
    for(plugin *proc = plugin_list; proc != NULL;){
961
961
      /* Is this process completely done? */
962
 
      if(proc->completed and proc->eof){
 
962
      if(proc->eof and proc->completed){
963
963
        /* Only accept the plugin output if it exited cleanly */
964
964
        if(not WIFEXITED(proc->status)
965
965
           or WEXITSTATUS(proc->status) != 0){