mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-18 19:49:40 +00:00
- Correct the patch to use sigaction(2) for 7.x and 6.x
Reported by: pointyhat via pav@
This commit is contained in:
parent
1d8ce56996
commit
3fd80b7558
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=271945
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user