/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: 2016-03-08 00:03:43 UTC
  • Revision ID: teddy@recompile.se-20160308000343-kjoyixwksmboql1s
Server bug fix: Work around bug when stopping server

* init.d-mandos (do_stop): Work around SIGTERM ignoring bug by doing
  "mandos-ctl >/dev/null 2>&1" after sending signal.
* mandos.service (ExecStop): New; set to "/bin/kill -TERM $MAINPID ;
  /usr/sbin/mandos-ctl >/dev/null 2>&1" to work around SIGTERM
  ignoring bug.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
#include <sys/select.h>         /* fd_set, select(), FD_ZERO(),
38
38
                                   FD_SET(), FD_ISSET(), FD_CLR */
39
39
#include <sys/wait.h>           /* wait(), waitpid(), WIFEXITED(),
40
 
                                   WEXITSTATUS(), WTERMSIG() */
 
40
                                   WEXITSTATUS(), WTERMSIG(),
 
41
                                   WCOREDUMP() */
41
42
#include <sys/stat.h>           /* struct stat, fstat(), S_ISREG() */
42
43
#include <iso646.h>             /* and, or, not */
43
44
#include <dirent.h>             /* struct dirent, scandirat() */
1158
1159
                      (intmax_t) (proc->pid),
1159
1160
                      WTERMSIG(proc->status),
1160
1161
                      strsignal(WTERMSIG(proc->status)));
 
1162
            } else if(WCOREDUMP(proc->status)){
 
1163
              fprintf(stderr, "Plugin %s [%" PRIdMAX "] dumped"
 
1164
                      " core\n", proc->name, (intmax_t) (proc->pid));
1161
1165
            }
1162
1166
          }
1163
1167