aboutsummaryrefslogtreecommitdiffstats
path: root/mail/youbin/files
diff options
context:
space:
mode:
authormax <max@FreeBSD.org>1996-10-09 20:50:55 +0800
committermax <max@FreeBSD.org>1996-10-09 20:50:55 +0800
commit513947d69f690f1b0d87b9a9a5440b7337ba52bd (patch)
treedcf401ec39183b5596d3cb33f33075ff18e90f7e /mail/youbin/files
parentdcce4e46220a9021e5d46b599e04db7d2ca6ad9a (diff)
downloadfreebsd-ports-gnome-513947d69f690f1b0d87b9a9a5440b7337ba52bd.tar.gz
freebsd-ports-gnome-513947d69f690f1b0d87b9a9a5440b7337ba52bd.tar.zst
freebsd-ports-gnome-513947d69f690f1b0d87b9a9a5440b7337ba52bd.zip
Added local hack to make youbind server detatch itself from the controling
tty at the startup. Removed `&' from the startup script since youbind doesn't need to be put background manually.
Diffstat (limited to 'mail/youbin/files')
-rw-r--r--mail/youbin/files/patch-ae39
1 files changed, 34 insertions, 5 deletions
diff --git a/mail/youbin/files/patch-ae b/mail/youbin/files/patch-ae
index 2c2edeceeb1f..8e1fe6171e66 100644
--- a/mail/youbin/files/patch-ae
+++ b/mail/youbin/files/patch-ae
@@ -1,6 +1,35 @@
-diff -c server.c.orig server.c
*** server.c.orig Sun Mar 26 20:33:31 1995
---- server.c Wed Aug 7 13:47:05 1996
+--- server.c Wed Oct 9 21:29:25 1996
+***************
+*** 48,53 ****
+--- 48,56 ----
+ #include <pwd.h> /* For getpwuid(). */
+ #include <signal.h>
+ #include <stdio.h>
++ #ifdef __FreeBSD__
++ #include <stdlib.h>
++ #endif
+
+ #include "youbin.h"
+ #include "server.h"
+***************
+*** 154,159 ****
+--- 157,171 ----
+ dummy.tv_sec = (long)(UNIT_TIME * 10);
+ dummy.tv_usec = 0L;
+
++ /*Go to background. This part was modified locally by Masafumi NAKANE
++ <max@wide.ad.jp>, and is used only on FreeBSD./*
++ #ifdef __FreeBSD__
++ if (daemon(1, 1) == -1) {
++ perror("daemon");
++ kill(getpid(), SIGTERM);
++ }
++ #endif
++
+ /* Dive into main loop. Don't use setjmp() and longjmp(),
+ because list maintenance routines are in critical section. */
+ alarm(UNIT_TIME);
***************
*** 244,250 ****
char buff[MESS_LEN + 1];
@@ -10,7 +39,7 @@ diff -c server.c.orig server.c
if (errno != EINTR) {
warn_log("Error in receiving packet\n");
}
---- 244,250 ----
+--- 256,262 ----
char buff[MESS_LEN + 1];
int len, flen = sizeof(ca);
@@ -27,7 +56,7 @@ diff -c server.c.orig server.c
sys_error_log("bind");
exit(EXIT_FAILURE);
}
---- 543,549 ----
+--- 555,561 ----
saddr->sin_family = hp->h_addrtype;
saddr->sin_addr.s_addr = htonl(INADDR_ANY);
saddr->sin_port = sp->s_port;
@@ -44,7 +73,7 @@ diff -c server.c.orig server.c
warn_log("Error in sending packet: %s\n", mess);
}
}
---- 586,592 ----
+--- 598,604 ----
debug_log("Send: %s [%ld]: \"%.*s\"\n",
((sp == CA_ADDR) ? "" : sp->parent->name), (long)sp,
MAX_DEBUG_COLUMN, mess);