Hang in tcdrain(3) after write(3)

Matthew Dillon dillon at backplane.com
Thu Nov 28 22:19:34 PST 2019


If modem control is turned on you have to go into clocal mode to drain
commands, otherwise its waiting for a carrier.  That's one possibility.

-Matt

On Mon, Nov 25, 2019 at 3:14 PM Jeffrey Walton <noloader at gmail.com> wrote:

> Hi Everyone,
>
> I'm testing some software on DragonFly. There's not much to it. It
> talks to the modem, and sends an ATZ and then reads the response.
> Linux, FreeBSD, NetBSD, OpenBSD and OS X are OK.
>
> My test rig is DragonFly 5.6-RELEASE x86_64 (fully patched) with a
> USR5637 modem, https://www.amazon.com/gp/product/B0013FDLM0. The modem
> is located at /dev/cuaU0.
>
> DragonFly hangs on the call to tcdrain(3). Looking at the man page I
> don't see any special handling. Cf.,
> http://man.dragonflybsd.org/?command=tcdrain.
>
> Attached is the reproducer. The trace is:
>
> % ./test.exe
> Setting TIOCEXCL
> Getting tty
> Setting tty options
> Flushing tty
> Setting tty
> Writing ATZ
> Waiting for write  <<-- call to tcdrain(fd)
>
> Thanks.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20191128/321b5693/attachment-0003.htm>


More information about the Users mailing list