/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 plugins.d/mandos-client.c

  • Committer: Teddy Hogeborn
  • Date: 2014-08-20 21:46:38 UTC
  • Revision ID: teddy@recompile.se-20140820214638-k4naueej6hffdgfg
mandos-client: Bug fix: Check fork() return value.

When executing network hook scripts, check fork() return value.

* plugins.d/mandos-client.c (run_network_hooks): Bug fix: check if
                                                 fork() returns -1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1650
1650
        _exit(EXIT_FAILURE);
1651
1651
      }
1652
1652
    } else {
 
1653
      if(hook_pid == -1){
 
1654
        perror_plus("fork");
 
1655
        free(direntry);
 
1656
        continue;
 
1657
      }
1653
1658
      int status;
1654
1659
      if(TEMP_FAILURE_RETRY(waitpid(hook_pid, &status, 0)) == -1){
1655
1660
        perror_plus("waitpid");