openbsd-ports/comms/xcept/patches/patch-ceptd_modeminit_c
2000-09-03 16:25:04 +00:00

31 lines
875 B
Plaintext

$OpenBSD: patch-ceptd_modeminit_c,v 1.1 2000/09/03 16:25:05 espie Exp $
--- ceptd/modeminit.c.orig Wed May 25 19:36:12 1994
+++ ceptd/modeminit.c Sun Sep 3 17:29:36 2000
@@ -82,6 +82,7 @@ static dial_btx(), changestring(), sendm
extern int errno;
extern int connectstatus, isdnflag;
+extern int inetd;
#ifdef USE_LOCK
#include <string.h>
@@ -134,7 +135,8 @@ FILE *initfile;
*/
modemclose()
{
- (void) setsid (); /* give up controling terminal modem */
+ if (!inetd)
+ (void) setsid (); /* give up controling terminal modem */
if(modem != -1){
sendmodem(hangupstring);
termflush(modem); /* get rid of garbage */
@@ -163,7 +165,7 @@ char *devname; int devspeed;
#endif
int s;
- if(-1 == setsid())
+ if(!inetd && -1 == setsid())
log(LOG_ERR,"Can't setsid : %m");
#ifdef USE_LOCK
device = strrchr(devname, '/');