Patch #: 9 Type: bug fix Priority: low Affects: sites running ARNS under HP-UX Reported: David Hornsby Summary: dissasociate from controlling terminal correctly Archived: munnari.OZ.AU mac/cap.patches/arns.patch009 Application: 'cd arns; patch -p < arns.patch009' *** arns.h.orig Thu May 19 16:54:55 1994 --- arns.h Thu May 19 20:13:24 1994 *************** *** 15,21 **** * djh@munnari.OZ.AU * * $Author: djh $ ! * $Revision: 1.10 $ * */ --- 15,21 ---- * djh@munnari.OZ.AU * * $Author: djh $ ! * $Revision: 1.11 $ * */ *************** *** 58,63 **** --- 58,67 ---- #define rindex(s,c) strrchr((char *)(s),(c)) #define index(s,c) strchr((char *)(s),(c)) #endif MAPFUNCS + + #ifdef hpux + #define POSIX + #endif /* hpux */ /* misc numbers */ *** arns.c.orig Thu May 19 16:54:52 1994 --- arns.c Thu May 19 20:13:27 1994 *************** *** 15,21 **** * djh@munnari.OZ.AU * * $Author: djh $ ! * $Revision: 1.8 $ * */ --- 15,21 ---- * djh@munnari.OZ.AU * * $Author: djh $ ! * $Revision: 1.9 $ * */ *************** *** 234,239 **** --- 234,240 ---- if (!debug) { if (fork()) exit(0); + #ifndef POSIX #ifdef TIOCNOTTY { int f; if ((f = open("/dev/tty", O_RDWR, 0644)) >= 0) { *************** *** 242,247 **** --- 243,251 ---- } } #endif /* TIOCNOTTY */ + #else /* POSIX */ + (void)setsid(); + #endif /* POSIX */ } /* *** Makefile.orig Thu May 19 17:57:59 1994 --- Makefile Thu May 19 20:26:33 1994 *************** *** 6,12 **** # # ! # Most supported hosts do not require special CFLAG or LIBS settings # # The defines for specific packet filters are # -DSNITPF SUN NIT PF (default) --- 6,12 ---- # # ! # CFLAG settings for various supported hosts # # The defines for specific packet filters are # -DSNITPF SUN NIT PF (default) *************** *** 16,49 **** # # For Sony NEWS OS4.2 or later to allow use of EtherTalk Phase 2 # CFLAGS=-Dsony_phaseII # LIBS= # # For IBM RS6000 AIX, Phase 1 or Phase 2 # CFLAGS=-DAIX # LIBS= # # For SUN Solaris 2.N, Phase 1 or Phase 2 # CFLAGS=-DSOLARIS # LIBS=-lsocket -lnsl # # For 386BSD, FreeBSD # CFLAGS=-DBPFILT # LIBS= # # For NeXT # CFLAGS=-bsd -O # LIBS= # CFLAGS= LIBS= all: arns arnsrd arns: arns.o pf.o ddp.o aarp.o ! cc -o arns arns.o pf.o ddp.o aarp.o ${LIBS} arnsrd: arnsrd.o ! cc -o arnsrd arnsrd.o ${LIBS} arns.o: arns.c arns.h --- 16,66 ---- # # For Sony NEWS OS4.2 or later to allow use of EtherTalk Phase 2 # CFLAGS=-Dsony_phaseII + # LFLAGS= # LIBS= # # For IBM RS6000 AIX, Phase 1 or Phase 2 # CFLAGS=-DAIX + # LFLAGS= # LIBS= # # For SUN Solaris 2.N, Phase 1 or Phase 2 # CFLAGS=-DSOLARIS + # LFLAGS= # LIBS=-lsocket -lnsl # + # For DEC Alpha OSF/1, Phase 1 or Phase 2 + # CFLAGS= + # LFLAGS= + # LIBS=pfopen.o + # # For 386BSD, FreeBSD # CFLAGS=-DBPFILT + # LFLAGS= # LIBS= # + # For HP 9000/700 HP-UX 9.x, with HP cc, (optimization suggestion only) + # Using Archive libraries does not result in noticeable performance gain. + # CFLAGS=+ESlit -J +O3 + # LFLAGS=+O3 + # LIBS= + # # For NeXT # CFLAGS=-bsd -O + # LFLAGS= # LIBS= # CFLAGS= + LFLAGS= LIBS= all: arns arnsrd arns: arns.o pf.o ddp.o aarp.o ! cc ${LFLAGS} -o arns arns.o pf.o ddp.o aarp.o ${LIBS} arnsrd: arnsrd.o ! cc ${LFLAGS} -o arnsrd arnsrd.o ${LIBS} arns.o: arns.c arns.h *** README.orig Thu May 19 16:59:52 1994 --- README Thu May 19 20:10:47 1994 *************** *** 5,11 **** The University of Melbourne djh@munnari.OZ.AU January, 1992 ! version 1.8 ARNS is 'A Remote Network Server' package for AppleTalk that allows a --- 5,11 ---- The University of Melbourne djh@munnari.OZ.AU January, 1992 ! version 1.9 ARNS is 'A Remote Network Server' package for AppleTalk that allows a