From owner-freebsd-current@FreeBSD.ORG Tue Feb 17 11:56:51 2009 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2413106566C for ; Tue, 17 Feb 2009 11:56:51 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id A2F638FC15 for ; Tue, 17 Feb 2009 11:56:51 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 09EBD1CE40; Tue, 17 Feb 2009 12:56:51 +0100 (CET) Date: Tue, 17 Feb 2009 12:56:51 +0100 From: Ed Schouten To: Michael Butler Message-ID: <20090217115651.GE79178@hoeg.nl> References: <20080526110543.J26343@fledge.watson.org> <4999F7F9.4030204@elischer.org> <499A024A.60209@protected-networks.net> <20090217110524.GC79178@hoeg.nl> <499A9C9D.3000403@protected-networks.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qpqR4wE1CEr+Roqx" Content-Disposition: inline In-Reply-To: <499A9C9D.3000403@protected-networks.net> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: current@FreeBSD.org Subject: Re: HEADS UP: IFF_NEEDSGIANT consumers to be disabled, removed X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2009 11:56:52 -0000 --qpqR4wE1CEr+Roqx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Michael, * Michael Butler wrote: > I have NETGRAPH_BLUETOOTH et al defined in my kernel which automagically > creates /dev/ubt0. With the appropriate entries in > /etc/bluetooth/[hosts|hcsecd.conf], I simply do .. >=20 > imb@toshi:/home/imb> less bin/gps-connect.sh > #!/bin/sh > /usr/bin/rfcomm_sppd -b -a QstarzGPS -t /dev/ttyp9 >=20 > .. to bring it out to a device where roadnav or gspdrive can read it. >=20 > Should I be doing something else in this script now? Well, this is not related to IFF_NEEDSGIANT and everything's fine, but there is something else I don't like about this approach in general (the way rfcomm_sppd works), namely that you `hardcode' a PTY name on the command line. There is never a guarantee ttyp9 is available for use, because another user can use it to log in with SSH, for example. Can you try this patch? http://80386.nl/pub/rfcomm_sppd.diff This changes the -t switch to take no argument and let the pseudo- terminal be allocated with posix_openpt(). Unfortunately I don't know how practical this is for rfcomm_sppd. So let me get this straight: when you use rfcomm_sppd -t, the application itself will not give any output and will close immediately (because it is run in the background). Maybe we could change it to just printf() the pseudo-terminal name, so you can do something like this: TTYNAME=3D"`rfcomm_sppd -b -a QstarzGPS -t`" # Use $TTYNAME here Any opinions on the subject? (Other people as well?) --=20 Ed Schouten WWW: http://80386.nl/ --qpqR4wE1CEr+Roqx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkmapgIACgkQ52SDGA2eCwXHBwCeKziyCvBNJvO/g1FWCn7CnUvH UNkAoICC2Ctn3uyTtwkgJM51A/cQiYQJ =DAZ4 -----END PGP SIGNATURE----- --qpqR4wE1CEr+Roqx--