The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Peter Pentchev <roam@ringlet.net>
To: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: Re: [TUHS] sockets (was Re: First appearance of named pipes)
Date: Sat, 28 Mar 2020 13:14:28 +0200	[thread overview]
Message-ID: <20200328111428.GA1431416@straylight.m.ringlet.net> (raw)
In-Reply-To: <20200328111234.GA342169@straylight.m.ringlet.net>

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

On Sat, Mar 28, 2020 at 01:12:35PM +0200, Peter Pentchev wrote:
> On Thu, Mar 26, 2020 at 01:38:17PM +1100, Dave Horsfall wrote:
> > On Wed, 25 Mar 2020, Grant Taylor via TUHS wrote:
> > 
> > > · netcat's STDOUT to grep's STDIN
> > > · grep's STDOUT to netcat's STDIN
> > 
> > Are you trying to set up a loop of processes or something?  I'm not sure if
> > that is even possible, although you can't rule out creative uses of dup2()
> > etc...
> 
> This can't really be done with netcat, but it's quite easy to do with
> socat; here's an example with a trivial program that reads lines from
> its standard input and writes a single line to its standard output:
> 
>     [roam@straylight ~]$ socat -v tcp4:nimbus.fccf.net:25 exec:./heysmtp.py
>     > 2020/03/28 13:09:04.005497  length=48 from=0 to=47
>     220 nimbus.fccf.net ESMTP Postfix (Debian/GNU)\r
>     < 2020/03/28 13:09:04.018931  length=6 from=0 to=5
>     QUIT\r
>     > 2020/03/28 13:09:04.035387  length=15 from=48 to=62
>     221 2.0.0 Bye\r
>     [roam@straylight ~]$
> 
> All the output was actually from socat because of the "-v" option
> specified.

...but, of course, this is still not what Derek was talking about
earlier - there is no separation of the file descriptors connected to
the socket: closing the stdout one would not result in a FIN being sent
along the line.

G'luck,
Peter

-- 
Peter Pentchev  roam@{ringlet.net,debian.org,FreeBSD.org} pp@storpool.com
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-03-28 11:21 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06 22:44 [TUHS] First appearance of named pipes Noel Chiappa
2020-03-07 12:17 ` Paul Ruizendaal
2020-03-07 13:29   ` Clem Cole
2020-03-07 16:39   ` Derek Fawcus
2020-03-08  2:36     ` Rob Pike
2020-03-08  2:47       ` Larry McVoy
2020-03-08 13:07         ` Ralph Corderoy
2020-03-08 13:25           ` arnold
2020-03-08  3:06       ` Dave Horsfall
2020-03-08  7:16       ` arnold
2020-03-08 15:13       ` [TUHS] sockets (was Re: First appearance of named pipes) Derek Fawcus
2020-03-09 23:22         ` Grant Taylor via TUHS
2020-03-09 23:44           ` Larry McVoy
2020-03-23  8:49           ` Peter Pentchev
2020-03-24  9:47             ` Derek Fawcus
2020-03-25 23:25               ` Grant Taylor via TUHS
2020-03-25 23:47                 ` Richard Salz
2020-03-26  0:11                   ` Grant Taylor via TUHS
2020-03-26  0:18                     ` Richard Salz
2020-03-26  1:08                       ` Grant Taylor via TUHS
2020-03-26  2:38                         ` Dave Horsfall
2020-03-26  3:08                           ` Rob Pike
2020-03-26  3:43                             ` George Michaelson
2020-03-26  4:11                           ` Grant Taylor via TUHS
2020-03-28 11:12                           ` Peter Pentchev
2020-03-28 11:14                             ` Peter Pentchev [this message]
2020-03-28 16:03                               ` Steffen Nurpmeso
2020-03-26  1:20                       ` Tony Finch
2020-03-27 10:51                   ` Derek Fawcus
2020-03-09 23:22 ` [TUHS] First appearance of named pipes Grant Taylor via TUHS
2020-03-10  7:29   ` arnold
2020-03-11  2:47     ` Grant Taylor via TUHS
2020-03-11  7:02       ` arnold
2020-03-10 13:49   ` Chet Ramey
2020-03-10 20:26     ` Dave Horsfall
2020-03-10 20:37       ` Chet Ramey
2020-03-11  2:51       ` Grant Taylor via TUHS
2020-03-08 23:09 [TUHS] sockets (was Re: First appearance of named pipes) Norman Wilson
2020-03-09 17:09 ` Tony Finch

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=20200328111428.GA1431416@straylight.m.ringlet.net \
    --to=roam@ringlet.net \
    --cc=tuhs@tuhs.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;
as well as URLs for NNTP newsgroup(s).