From: Grant Edwards <grant.b.edwards@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH v2] tty/serial: Add a serial port simulator
Date: Fri, 29 Mar 2019 18:24:01 -0000 (UTC) [thread overview]
Message-ID: <q7lns1$183b$1@blaine.gmane.org> (raw)
In-Reply-To: 20190329165140.GD31733@minyard.net
On 2019-03-29, Corey Minyard <minyard@acm.org> wrote:
> On Thu, Mar 28, 2019 at 12:39:12PM -0700, H. Peter Anvin wrote:
>
>> Dumb question: this is basically a pty on steroids. Wouldn't this be
>> better done by enhancing the pty devices?
I proposed doing that several years ago, and offered to start working
on it if there was a decent chance it would be accepted into the tree.
I got no response.
> I did look at that, but it would be pretty invasive to pty. There's
> no modem control stuff, none of the other special serial ioctls.
> And the locking in this driver is fairly strange because you have
> two serial ports looking at each other's data for modem control.
> But that might not be a big deal.
>
> Adding the speed simulation to ptys would also be really strange.
> That's not a deal-breaker, I suppose, but it's not much of a serial
> port simulation without it.
My goal wasn't really to simulate two serial ports with a null-mode
cable in-between, so the speed simluaiton wasn't on my list. my goal
was to provide a way to implement a serial port in userspace by
attaching an application to the master end of a pty.
The pty(7) man page states "The slave end of the pseudoterminal
provides an interface that behaves exactly like a classical terminal."
But, we all know that's a pretty big lie: the pty slave end implements
only a small subset of a "classical termial" device, and there are all
sorts of applications that expect to talk to a serial port which fail
miserably when connected to a pty.
--
Grant Edwards grant.b.edwards Yow! I had a lease on an
at OEDIPUS COMPLEX back in
gmail.com '81 ...
next prev parent reply other threads:[~2019-03-29 18:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-05 17:12 [PATCH v2] tty/serial: Add a serial port simulator minyard
2019-03-05 23:29 ` Randy Dunlap
2019-03-06 1:51 ` Corey Minyard
2019-03-06 2:04 ` Randy Dunlap
2019-03-28 19:39 ` H. Peter Anvin
2019-03-29 16:51 ` Corey Minyard
2019-03-29 18:24 ` Grant Edwards [this message]
2019-03-27 15:44 ` Greg Kroah-Hartman
2019-03-29 22:13 ` Corey Minyard
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='q7lns1$183b$1@blaine.gmane.org' \
--to=grant.b.edwards@gmail.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox