File 26000-tix69-bnc830525-No-logger-pipe-for-sfcblocal.patch of Package sblim-sfcb
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-sblim-sfcb-1.3.17/cimcClientSfcbLocal.c ./cimcClientSfcbLocal.c
--- ../orig-sblim-sfcb-1.3.17/cimcClientSfcbLocal.c 2013-08-26 10:43:30.000000000 +0200
+++ ./cimcClientSfcbLocal.c 2013-08-26 11:31:10.072173102 +0200
@@ -1920,7 +1920,7 @@
static void* release(ClientEnv* ce)
{
void *lib=ce->hdl;
- closeLogging();
+ closeLogging(0);
CONNECT_LOCK();
if (localConnectCount > 0) localConnectCount -= 1;
if (localConnectCount == 0) {
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-sblim-sfcb-1.3.17/mlog.c ./mlog.c
--- ../orig-sblim-sfcb-1.3.17/mlog.c 2013-08-21 01:26:19.000000000 +0200
+++ ./mlog.c 2013-08-26 11:31:10.072173102 +0200
@@ -130,9 +130,10 @@
* Closes the pipe used for logging and closes out
* the syslog services that are created in startLogging.
*/
-void closeLogging() {
+void closeLogging(int thread) {
int wstat;
closelog();
+ if (thread)
close(logfds[1]);
wait(&wstat); // wait to prevent zombie
}
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-sblim-sfcb-1.3.17/mlog.h ./mlog.h
--- ../orig-sblim-sfcb-1.3.17/mlog.h 2013-08-21 01:26:19.000000000 +0200
+++ ./mlog.h 2013-08-26 11:31:10.072173102 +0200
@@ -30,7 +30,7 @@
#define LOG_MSG_MAX 4096
void startLogging(int level, int thread);
-void closeLogging();
+void closeLogging(int thread);
void mlogf(int priority, int errout, const char* fmt, ...);
#endif
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-sblim-sfcb-1.3.17/sfcBroker.c ./sfcBroker.c
--- ../orig-sblim-sfcb-1.3.17/sfcBroker.c 2013-08-26 10:46:47.000000000 +0200
+++ ./sfcBroker.c 2013-08-26 11:31:10.072173102 +0200
@@ -249,7 +249,7 @@
uninitSocketPairs();
sunsetControl();
uninitGarbageCollector();
- closeLogging();
+ closeLogging(1);
free((void *)sfcBrokerStart);
pthread_mutex_unlock(&syncMtx);