From owner-freebsd-questions Sat Oct 14 04:52:28 1995 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id EAA05539 for questions-outgoing; Sat, 14 Oct 1995 04:52:28 -0700 Received: from late5.e-technik.uni-erlangen.de (late5.e-technik.uni-erlangen.de [131.188.254.132]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id EAA05529 for ; Sat, 14 Oct 1995 04:52:23 -0700 Received: (from tuucp@localhost) by late5.e-technik.uni-erlangen.de (8.6.10/8.6.6) id HAA21406 for questions@freebsd.org; Sat, 14 Oct 1995 07:52:04 -0400 Received: from odin (iwte01-2.dialin.rrze.uni-erlangen.de [192.44.83.18]) by iwte01.dialin.rrze.uni-erlangen.de (8.6.11/8.6.6) with ESMTP id MAA03399; Sat, 14 Oct 1995 12:52:13 +0100 Received: (from eilts@localhost) by odin (8.6.8/8.6.6) id MAA00431; Sat, 14 Oct 1995 12:52:11 +0100 Date: Sat, 14 Oct 1995 12:52:11 +0100 From: Hinrich Eilts Message-Id: <199510141152.MAA00431@odin> Received: by NeXT.Mailer (1.100) Received: by NeXT Mailer (1.100) To: questions@freebsd.org Subject: Re: hylafax unable to spawn getty Cc: brian@MediaCity.com (Brian Litzinger) Sender: owner-questions@freebsd.org Precedence: bulk > I'm running hylafax on a 2.1 SNAP 951005 with a generic > ROCKWELL modem and it mostly works. However, when > I make a data call into the system, the log shows > that it spawns getty on the port, put no login > ever shows up. I can see (via ps) getty on the right port > just sitting there. It sits there until I kill the getty > at which point I get hung up upon and the hylafax system > takes over again. If a data-call happens, a Rockwell based modems (ELSA Microlink 28.8 TQV in my case) picks up line, recognize the data-call and sends +FDM while it negotiate speed, compression etc with remote modem. Because HylaFax spawns getty on receiving +FDM, getty got /dev/cuaa* before the connection is enabled (modem is still negotating). To solve this problem, getty should wait for the CONNECT message and not for +FDM, there is an option in HylaFax conf named ModemWaitForConnect for this. In my case, because this option does not work (for me), I installed a little hacked version of getty named fgetty waiting for CONNECT for HylaFax (only HylaFax uses it, of course): fd_set readset; struct timeval connectwait; [...] if (argc <= 2 || strcmp(argv[2], "-") == 0) { strcpy(ttyn, ttyname(0)); FD_ZERO(&readset); FD_SET(STDIN_FILENO, &readset); connectwait.tv_sec = MAXCONNECTWAIT; connectwait.tv_usec = 0; n = select(STDIN_FILENO +1,&readset,NULL,NULL,&connectwait); if (n == 0) { syslog(LOG_ERR, "%s: timeout on waiting for CONNECT", ttyn); exit(1); } else if (n < 0) { syslog(LOG_ERR, "%s: select: %m"); exit(1); } } [...] You must tell the fgetty at config-time to HylaFax. Because I used an old getty for this, I cannot provide an actual patch, but I think it is easy for you. Hinrich