aboutsummaryrefslogtreecommitdiff
path: root/sysutils/fileschanged/files
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2004-06-16 18:21:49 +0000
committerPav Lucistnik <pav@FreeBSD.org>2004-06-16 18:21:49 +0000
commitb1c26af872aef7bd5f1603377032452cd7be0423 (patch)
tree4d465bb40e6994dcae8f504e97e748e4cc8d3c9b /sysutils/fileschanged/files
parent6e0f323d902e0114319c1ea4139ecc687277e412 (diff)
downloadports-b1c26af872aef7bd5f1603377032452cd7be0423.tar.gz
ports-b1c26af872aef7bd5f1603377032452cd7be0423.zip
Notes
Diffstat (limited to 'sysutils/fileschanged/files')
-rw-r--r--sysutils/fileschanged/files/patch-handlers.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sysutils/fileschanged/files/patch-handlers.c b/sysutils/fileschanged/files/patch-handlers.c
index 6a85acfd3fca..2903833803b8 100644
--- a/sysutils/fileschanged/files/patch-handlers.c
+++ b/sysutils/fileschanged/files/patch-handlers.c
@@ -1,20 +1,23 @@
--- src/handlers.c.orig Mon Feb 23 01:42:46 2004
-+++ src/handlers.c Sun May 23 17:50:35 2004
-@@ -7,6 +7,10 @@
++++ src/handlers.c Wed Jun 16 20:13:06 2004
+@@ -7,6 +7,11 @@
#include "node.h"
#include "opts.h"
#include "wl.h"
+#if defined(__FreeBSD__)
++#include <signal.h>
+#include "libgen.h"
+#endif
+
extern struct arguments_t arguments;
struct handler_t handlers[FC_HANDLER_MAX]=
{
-@@ -180,12 +184,18 @@
+@@ -180,12 +185,24 @@
}
void show_event(enum handler_enum_t id, char *filename)
{
++ struct sigaction sa;
++
+ if (arguments.fileschanged.exec_command == NULL) {
if (arguments.fileschanged.showaction)
{
@@ -23,6 +26,10 @@
fprintf(stdout, "%s\n",filename);
fflush(stdout);
+ } else {
++ sa.sa_handler = SIG_IGN;
++ sa.sa_flags = SA_NOCLDWAIT;
++ sigemptyset(&sa.sa_mask);
++ sigaction(SIGCHLD, &sa, NULL);
+ if (!fork()) {
+ execlp(arguments.fileschanged.exec_command, arguments.fileschanged.exec_command, handlers[id].name, filename, NULL);
+ }