Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Dec 2015 13:43:21 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 205398] [regression] [tty] tty_drain() kernel function lacks timeout support it had before
Message-ID:  <bug-205398-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205398

            Bug ID: 205398
           Summary: [regression] [tty] tty_drain() kernel function lacks
                    timeout support it had before
           Product: Base System
           Version: 10.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Keywords: regression
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: eugen@grosbein.net
          Keywords: regression

Revision 181905 by ed@freebsd.org brought the new MPSAFE TTY layer and removed
"drainwain" timeout support. Now applications working with serial port can hang
forever on close() system call:

- an application opens /dev/cuau0 in non-blocing i/o mode and tries to detect
GSM gateway there writing commands like ATZ, ATE1 etc. to the device;
- the device may be dead (lost power, broken, disconnected etc.) and does not
answer back;
- application timeouts waiting for answer and closes device with close()
- tty layer tries to drain output "forever", until a signal arrives.

gnokii (comms/gnokii) suffers from this problem.

Please re-implement tunable timeout and TIOCSDRAINWAIT syscall kernel has
before.

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-205398-8>