Add a patch to make the pwlib library work with the new pthreads (libc_r)
library in FreeBSD 4.2 (and in -current) Important Note: Existing binaries for OhPhone, GateKeeper, OpenGateKeeper, SimpleH323 and OpenAM WILL NOT WORK with FreeBSD 4.2 or higher and will report "User signal 2" and abort due to an unhandled signal in pwlib. You must recompile all these applications. Reported by: Blaz Zupan <blaz@amis.net> Suggested fix by: Daniel M. Eischen <eischen@vigrid.com>
This commit is contained in:
parent
bcb019a5f4
commit
3d1a8c14b4
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=35038
4 changed files with 228 additions and 0 deletions
57
net/opal/files/patch-aa
Normal file
57
net/opal/files/patch-aa
Normal file
|
@ -0,0 +1,57 @@
|
|||
*** ../pwlib/src/ptlib/unix/tlibthrd.cxx.orig Sun Nov 12 08:22:06 2000
|
||||
--- ../pwlib/src/ptlib/unix/tlibthrd.cxx Sun Nov 12 08:22:17 2000
|
||||
*************** static void sigSuspendHandler(int)
|
||||
*** 261,266 ****
|
||||
--- 261,273 ----
|
||||
}
|
||||
|
||||
|
||||
+ static void sigResumeHandler(int)
|
||||
+ {
|
||||
+ // do nothing. This is here so the 'signal' is consumed
|
||||
+ // and stops the application terminating with "User signal 2"
|
||||
+ }
|
||||
+
|
||||
+
|
||||
void HouseKeepingThread::Main()
|
||||
{
|
||||
PProcess & process = PProcess::Current();
|
||||
*************** void * PThread::PX_ThreadStart(void * ar
|
||||
*** 437,446 ****
|
||||
}
|
||||
|
||||
// set the signal handler for SUSPEND_SIG
|
||||
! struct sigaction action;
|
||||
! memset(&action, 0, sizeof(action));
|
||||
! action.sa_handler = sigSuspendHandler;
|
||||
! sigaction(SUSPEND_SIG, &action, 0);
|
||||
|
||||
// now call the the thread main routine
|
||||
//PTRACE(1, "tlibthrd\tAbout to call Main");
|
||||
--- 444,453 ----
|
||||
}
|
||||
|
||||
// set the signal handler for SUSPEND_SIG
|
||||
! struct sigaction suspend_action;
|
||||
! memset(&suspend_action, 0, sizeof(suspend_action));
|
||||
! suspend_action.sa_handler = sigSuspendHandler;
|
||||
! sigaction(SUSPEND_SIG, &suspend_action, 0);
|
||||
|
||||
// now call the the thread main routine
|
||||
//PTRACE(1, "tlibthrd\tAbout to call Main");
|
||||
*************** void PThread::Suspend(BOOL susp)
|
||||
*** 559,564 ****
|
||||
--- 566,578 ----
|
||||
{
|
||||
PAssertOS(pthread_mutex_lock(&PX_suspendMutex) == 0);
|
||||
BOOL unlock = TRUE;
|
||||
+
|
||||
+ #if defined(P_FREEBSD)
|
||||
+ struct sigaction resume_action;
|
||||
+ memset(&resume_action, 0, sizeof(resume_action));
|
||||
+ resume_action.sa_handler = sigResumeHandler;
|
||||
+ sigaction(RESUME_SIG, &resume_action, 0);
|
||||
+ #endif
|
||||
|
||||
if (pthread_kill(PX_threadId, 0) == 0) {
|
||||
|
57
net/opal3/files/patch-aa
Normal file
57
net/opal3/files/patch-aa
Normal file
|
@ -0,0 +1,57 @@
|
|||
*** ../pwlib/src/ptlib/unix/tlibthrd.cxx.orig Sun Nov 12 08:22:06 2000
|
||||
--- ../pwlib/src/ptlib/unix/tlibthrd.cxx Sun Nov 12 08:22:17 2000
|
||||
*************** static void sigSuspendHandler(int)
|
||||
*** 261,266 ****
|
||||
--- 261,273 ----
|
||||
}
|
||||
|
||||
|
||||
+ static void sigResumeHandler(int)
|
||||
+ {
|
||||
+ // do nothing. This is here so the 'signal' is consumed
|
||||
+ // and stops the application terminating with "User signal 2"
|
||||
+ }
|
||||
+
|
||||
+
|
||||
void HouseKeepingThread::Main()
|
||||
{
|
||||
PProcess & process = PProcess::Current();
|
||||
*************** void * PThread::PX_ThreadStart(void * ar
|
||||
*** 437,446 ****
|
||||
}
|
||||
|
||||
// set the signal handler for SUSPEND_SIG
|
||||
! struct sigaction action;
|
||||
! memset(&action, 0, sizeof(action));
|
||||
! action.sa_handler = sigSuspendHandler;
|
||||
! sigaction(SUSPEND_SIG, &action, 0);
|
||||
|
||||
// now call the the thread main routine
|
||||
//PTRACE(1, "tlibthrd\tAbout to call Main");
|
||||
--- 444,453 ----
|
||||
}
|
||||
|
||||
// set the signal handler for SUSPEND_SIG
|
||||
! struct sigaction suspend_action;
|
||||
! memset(&suspend_action, 0, sizeof(suspend_action));
|
||||
! suspend_action.sa_handler = sigSuspendHandler;
|
||||
! sigaction(SUSPEND_SIG, &suspend_action, 0);
|
||||
|
||||
// now call the the thread main routine
|
||||
//PTRACE(1, "tlibthrd\tAbout to call Main");
|
||||
*************** void PThread::Suspend(BOOL susp)
|
||||
*** 559,564 ****
|
||||
--- 566,578 ----
|
||||
{
|
||||
PAssertOS(pthread_mutex_lock(&PX_suspendMutex) == 0);
|
||||
BOOL unlock = TRUE;
|
||||
+
|
||||
+ #if defined(P_FREEBSD)
|
||||
+ struct sigaction resume_action;
|
||||
+ memset(&resume_action, 0, sizeof(resume_action));
|
||||
+ resume_action.sa_handler = sigResumeHandler;
|
||||
+ sigaction(RESUME_SIG, &resume_action, 0);
|
||||
+ #endif
|
||||
|
||||
if (pthread_kill(PX_threadId, 0) == 0) {
|
||||
|
57
net/openh323-112/files/patch-aa
Normal file
57
net/openh323-112/files/patch-aa
Normal file
|
@ -0,0 +1,57 @@
|
|||
*** ../pwlib/src/ptlib/unix/tlibthrd.cxx.orig Sun Nov 12 08:22:06 2000
|
||||
--- ../pwlib/src/ptlib/unix/tlibthrd.cxx Sun Nov 12 08:22:17 2000
|
||||
*************** static void sigSuspendHandler(int)
|
||||
*** 261,266 ****
|
||||
--- 261,273 ----
|
||||
}
|
||||
|
||||
|
||||
+ static void sigResumeHandler(int)
|
||||
+ {
|
||||
+ // do nothing. This is here so the 'signal' is consumed
|
||||
+ // and stops the application terminating with "User signal 2"
|
||||
+ }
|
||||
+
|
||||
+
|
||||
void HouseKeepingThread::Main()
|
||||
{
|
||||
PProcess & process = PProcess::Current();
|
||||
*************** void * PThread::PX_ThreadStart(void * ar
|
||||
*** 437,446 ****
|
||||
}
|
||||
|
||||
// set the signal handler for SUSPEND_SIG
|
||||
! struct sigaction action;
|
||||
! memset(&action, 0, sizeof(action));
|
||||
! action.sa_handler = sigSuspendHandler;
|
||||
! sigaction(SUSPEND_SIG, &action, 0);
|
||||
|
||||
// now call the the thread main routine
|
||||
//PTRACE(1, "tlibthrd\tAbout to call Main");
|
||||
--- 444,453 ----
|
||||
}
|
||||
|
||||
// set the signal handler for SUSPEND_SIG
|
||||
! struct sigaction suspend_action;
|
||||
! memset(&suspend_action, 0, sizeof(suspend_action));
|
||||
! suspend_action.sa_handler = sigSuspendHandler;
|
||||
! sigaction(SUSPEND_SIG, &suspend_action, 0);
|
||||
|
||||
// now call the the thread main routine
|
||||
//PTRACE(1, "tlibthrd\tAbout to call Main");
|
||||
*************** void PThread::Suspend(BOOL susp)
|
||||
*** 559,564 ****
|
||||
--- 566,578 ----
|
||||
{
|
||||
PAssertOS(pthread_mutex_lock(&PX_suspendMutex) == 0);
|
||||
BOOL unlock = TRUE;
|
||||
+
|
||||
+ #if defined(P_FREEBSD)
|
||||
+ struct sigaction resume_action;
|
||||
+ memset(&resume_action, 0, sizeof(resume_action));
|
||||
+ resume_action.sa_handler = sigResumeHandler;
|
||||
+ sigaction(RESUME_SIG, &resume_action, 0);
|
||||
+ #endif
|
||||
|
||||
if (pthread_kill(PX_threadId, 0) == 0) {
|
||||
|
57
net/openh323/files/patch-aa
Normal file
57
net/openh323/files/patch-aa
Normal file
|
@ -0,0 +1,57 @@
|
|||
*** ../pwlib/src/ptlib/unix/tlibthrd.cxx.orig Sun Nov 12 08:22:06 2000
|
||||
--- ../pwlib/src/ptlib/unix/tlibthrd.cxx Sun Nov 12 08:22:17 2000
|
||||
*************** static void sigSuspendHandler(int)
|
||||
*** 261,266 ****
|
||||
--- 261,273 ----
|
||||
}
|
||||
|
||||
|
||||
+ static void sigResumeHandler(int)
|
||||
+ {
|
||||
+ // do nothing. This is here so the 'signal' is consumed
|
||||
+ // and stops the application terminating with "User signal 2"
|
||||
+ }
|
||||
+
|
||||
+
|
||||
void HouseKeepingThread::Main()
|
||||
{
|
||||
PProcess & process = PProcess::Current();
|
||||
*************** void * PThread::PX_ThreadStart(void * ar
|
||||
*** 437,446 ****
|
||||
}
|
||||
|
||||
// set the signal handler for SUSPEND_SIG
|
||||
! struct sigaction action;
|
||||
! memset(&action, 0, sizeof(action));
|
||||
! action.sa_handler = sigSuspendHandler;
|
||||
! sigaction(SUSPEND_SIG, &action, 0);
|
||||
|
||||
// now call the the thread main routine
|
||||
//PTRACE(1, "tlibthrd\tAbout to call Main");
|
||||
--- 444,453 ----
|
||||
}
|
||||
|
||||
// set the signal handler for SUSPEND_SIG
|
||||
! struct sigaction suspend_action;
|
||||
! memset(&suspend_action, 0, sizeof(suspend_action));
|
||||
! suspend_action.sa_handler = sigSuspendHandler;
|
||||
! sigaction(SUSPEND_SIG, &suspend_action, 0);
|
||||
|
||||
// now call the the thread main routine
|
||||
//PTRACE(1, "tlibthrd\tAbout to call Main");
|
||||
*************** void PThread::Suspend(BOOL susp)
|
||||
*** 559,564 ****
|
||||
--- 566,578 ----
|
||||
{
|
||||
PAssertOS(pthread_mutex_lock(&PX_suspendMutex) == 0);
|
||||
BOOL unlock = TRUE;
|
||||
+
|
||||
+ #if defined(P_FREEBSD)
|
||||
+ struct sigaction resume_action;
|
||||
+ memset(&resume_action, 0, sizeof(resume_action));
|
||||
+ resume_action.sa_handler = sigResumeHandler;
|
||||
+ sigaction(RESUME_SIG, &resume_action, 0);
|
||||
+ #endif
|
||||
|
||||
if (pthread_kill(PX_threadId, 0) == 0) {
|
||||
|
Loading…
Reference in a new issue