/mandos/release

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

« back to all changes in this revision

Viewing changes to plugin-runner.c

merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
309
309
  struct stat st;
310
310
  fd_set rfds_all;
311
311
  int ret, maxfd = 0;
 
312
  ssize_t sret;
312
313
  uid_t uid = 65534;
313
314
  gid_t gid = 65534;
314
315
  bool debug = false;
546
547
    char *org_line = NULL;
547
548
    char *p, *arg, *new_arg, *line;
548
549
    size_t size = 0;
549
 
    ssize_t sret;
550
550
    const char whitespace_delims[] = " \r\t\f\v\n";
551
551
    const char comment_delim[] = "#";
552
552
 
1019
1019
        proc->buffer_size += BUFFER_SIZE;
1020
1020
      }
1021
1021
      /* Read from the process */
1022
 
      ret = read(proc->fd, proc->buffer + proc->buffer_length,
1023
 
                 BUFFER_SIZE);
1024
 
      if(ret < 0){
 
1022
      sret = read(proc->fd, proc->buffer + proc->buffer_length,
 
1023
                  BUFFER_SIZE);
 
1024
      if(sret < 0){
1025
1025
        /* Read error from this process; ignore the error */
1026
1026
        proc = proc->next;
1027
1027
        continue;
1028
1028
      }
1029
 
      if(ret == 0){
 
1029
      if(sret == 0){
1030
1030
        /* got EOF */
1031
1031
        proc->eof = true;
1032
1032
      } else {
1033
 
        proc->buffer_length += (size_t) ret;
 
1033
        proc->buffer_length += (size_t) sret;
1034
1034
      }
1035
1035
    }
1036
1036
  }