aboutsummaryrefslogtreecommitdiff
path: root/misc/mbuffer/files
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2011-03-28 16:47:06 +0000
committerRong-En Fan <rafan@FreeBSD.org>2011-03-28 16:47:06 +0000
commit3fd80b7558b00cc5d6d0cfa751c0285afff2e0e6 (patch)
tree2c6394019285e34ac1f813b58e6df48044f9c70b /misc/mbuffer/files
parent1d8ce569967d4ba6d50806eb1f8b79599f9b9cc3 (diff)
downloadports-3fd80b7558b00cc5d6d0cfa751c0285afff2e0e6.tar.gz
ports-3fd80b7558b00cc5d6d0cfa751c0285afff2e0e6.zip
- Correct the patch to use sigaction(2) for 7.x and 6.x
Reported by: pointyhat via pav@
Notes
Notes: svn path=/head/; revision=271945
Diffstat (limited to 'misc/mbuffer/files')
-rw-r--r--misc/mbuffer/files/patch-mbuffer.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/misc/mbuffer/files/patch-mbuffer.c b/misc/mbuffer/files/patch-mbuffer.c
index a00bb11fb7c7..2cc32533fcfb 100644
--- a/misc/mbuffer/files/patch-mbuffer.c
+++ b/misc/mbuffer/files/patch-mbuffer.c
@@ -1,12 +1,27 @@
-# Only needed for FreeBSD < 8.1, but no harm
---- mbuffer.c.orig 2011-03-26 15:45:51.000000000 +0800
-+++ mbuffer.c 2011-03-26 15:45:47.000000000 +0800
-@@ -2007,7 +2007,7 @@
+--- mbuffer.c.orig 2011-03-18 06:03:24.000000000 +0800
++++ mbuffer.c 2011-03-29 00:20:54.000000000 +0800
+@@ -1513,6 +1513,7 @@
+ long mxnrsem;
+ int err, optMset = 0, optSset = 0, optBset = 0, c, fl, numstdout = 0, numthreads = 0, numOut = 0;
+ sigset_t signalSet;
++ struct sigaction signalIgnoreAct;
+ #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
+ struct stat st;
+ #endif
+@@ -1525,6 +1526,7 @@
+ #if defined(_SC_AVPHYS_PAGES) && defined(_SC_PAGESIZE) && !defined(__CYGWIN__)
+ long pgsz, nump;
+
++ signalIgnoreAct.sa_action = SIG_IGN;
+ TickTime = 1000000 / sysconf(_SC_CLK_TCK);
+ pgsz = sysconf(_SC_PAGESIZE);
+ assert(pgsz > 0);
+@@ -2007,7 +2009,7 @@
}
debugmsg("checking if we have a controlling terminal...\n");
- err = sigignore(SIGTTIN);
-+ err = sigset(SIGTTIN, SIG_IGN);
++ err = sigaction(SIGTTIN, &signalIgnoreAct, NULL);
assert(err == 0);
fl = fcntl(STDERR_FILENO,F_GETFL);
err = fcntl(STDERR_FILENO,F_SETFL,fl | O_NONBLOCK);