All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Goode <adam@spicenitz.org>
To: linux-serial@vger.kernel.org
Subject: TIOCMIWAIT hopelessly broken?
Date: Fri, 13 Mar 2009 22:13:30 -0400	[thread overview]
Message-ID: <49BB12CA.9000604@spicenitz.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

Hi,

The ioctl TIOCMIWAIT seems to be inadequate for tracking changes in the
modem status lines. The main problem is that it cannot be used without
racing: if the status change you are waiting for happens before your
ioctl, you will wait forever.

A solution would be one like a eventfd, something that can be put to
poll(), epoll(), or select(), and where you read the status changes with
read().

Any ideas on how to do this? Would it be a new syscall, something in
/sys, a flag to open() ?


Thanks,

Adam


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

                 reply	other threads:[~2009-03-14  2:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49BB12CA.9000604@spicenitz.org \
    --to=adam@spicenitz.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.