Date: Mon, 15 Dec 1997 05:30:02 -0800 (PST) From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs Subject: Re: bin/5296: slattach fails creating pidfile with ioctl(TIOCSCTTY): Operation not permitted Message-ID: <199712151330.FAA27170@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/5296; it has been noted by GNATS. From: Bruce Evans <bde@zeta.org.au> To: FreeBSD-gnats-submit@FreeBSD.ORG, rhh@ct.picker.com Cc: Subject: Re: bin/5296: slattach fails creating pidfile with ioctl(TIOCSCTTY): Operation not permitted Date: Tue, 16 Dec 1997 00:20:50 +1100 >>How-To-Repeat: > > Here is a clip from my "slip-on" script that shows how I invoke > slattach (error checking removed for simplicity): > > #!/bin/sh > ... > exec 0< /dev/cuaa1 > exec 1> /dev/cuaa1 > chat TIMEOUT 2 "" AT OK AT OK > chat "" "$INITSTRING" "OK" "AT$DIALSTRING" ...<request slip cmds> > slattach -h -c -s 57600 /dev/cuaa1 > /dev/null 2>&1 & slattach can't do controlling tty stuff properly if the tty is already open. It should fail completely when the TIOCSCTTY fails, but its cleanup is incomplete - it removes the pid file but doesn't unattach slip :-). Chatting with the tty has to be done by calling chat from inside slattach (-z -r ...). Support for an initial command without a redial command seems to be missing. I think aborting on SIGHUP when there is no redial command has been broken for a long time. Scripts probably expect this brokenness. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712151330.FAA27170>