From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RDNS_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.2 Received: (qmail 26482 invoked from network); 28 Mar 2020 11:21:36 -0000 Received-SPF: pass (minnie.tuhs.org: domain of minnie.tuhs.org designates 45.79.103.53 as permitted sender) receiver=inbox.vuxu.org; client-ip=45.79.103.53 envelope-from= Received: from unknown (HELO minnie.tuhs.org) (45.79.103.53) by inbox.vuxu.org with ESMTP; 28 Mar 2020 11:21:36 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 3F3C79DA1E; Sat, 28 Mar 2020 21:21:15 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id D99B69D5C0; Sat, 28 Mar 2020 21:20:46 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 003C39D577; Sat, 28 Mar 2020 21:19:48 +1000 (AEST) X-Greylist: delayed 430 seconds by postgrey-1.36 at minnie.tuhs.org; Sat, 28 Mar 2020 21:19:47 AEST Received: from nimbus.fccf.net (nimbus.fccf.net [185.117.82.79]) by minnie.tuhs.org (Postfix) with ESMTPS id 5A47D9D56C for ; Sat, 28 Mar 2020 21:19:47 +1000 (AEST) Received: from straylight.m.ringlet.net (unknown [93.152.146.108]) by nimbus.fccf.net (Postfix) with ESMTPSA id 1539B201 for ; Sat, 28 Mar 2020 13:14:29 +0200 (EET) Received: from roam (uid 1000) (envelope-from roam@ringlet.net) id 620121 by straylight.m.ringlet.net (DragonFly Mail Agent v0.12); Sat, 28 Mar 2020 13:14:28 +0200 Date: Sat, 28 Mar 2020 13:14:28 +0200 From: Peter Pentchev To: The Eunuchs Hysterical Society Message-ID: <20200328111428.GA1431416@straylight.m.ringlet.net> References: <5dbf2153-5993-242a-5ba9-54b49a38569e@spamtrap.tnetconsulting.net> <20200323084943.GA341861@straylight.m.ringlet.net> <20200324094710.GB83316@clarinet.employees.org> <127f7c5c-a607-8f5b-1760-5a308c279836@tnetconsulting.net> <20200328111234.GA342169@straylight.m.ringlet.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ZGiS0Q5IWpPtfppv" Content-Disposition: inline In-Reply-To: <20200328111234.GA342169@straylight.m.ringlet.net> Subject: Re: [TUHS] sockets (was Re: First appearance of named pipes) X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: > >=20 > > > =C2=B7 netcat's STDOUT to grep's STDIN > > > =C2=B7 grep's STDOUT to netcat's STDIN > >=20 > > Are you trying to set up a loop of processes or something? I'm not sur= e if > > that is even possible, although you can't rule out creative uses of dup= 2() > > etc... >=20 > 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: >=20 > [roam@straylight ~]$ socat -v tcp4:nimbus.fccf.net:25 exec:./heysmtp.= py > > 2020/03/28 13:09:04.005497 length=3D48 from=3D0 to=3D47 > 220 nimbus.fccf.net ESMTP Postfix (Debian/GNU)\r > < 2020/03/28 13:09:04.018931 length=3D6 from=3D0 to=3D5 > QUIT\r > > 2020/03/28 13:09:04.035387 length=3D15 from=3D48 to=3D62 > 221 2.0.0 Bye\r > [roam@straylight ~]$ >=20 > All the output was actually from socat because of the "-v" option > specified. =2E..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 --=20 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 --ZGiS0Q5IWpPtfppv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEELuenpRf8EkzxFcNUZR7vsCUn3xMFAl5/MZQACgkQZR7vsCUn 3xOelg//bUxlcPLP0yQpRW9ZtK1ply9WUB2spKOJjZM4V4p5j7rBoDpurbCfvc78 4heeN8BdAzyqSF0UGmBbqWCutv3y+pVWKryWjtZi9tPytalVHDmVCOEPyhMJH3WI eeqHb318PHmOCiw4R34yHUP93Glisf9yB0YGxWMTVvyAU/WBZWVmKy6O1zR81fKJ puGevfOK2jPOWjym8ELaPhzz9MxTMipkHn7X6SqeAYMm8u+kAI6Rv47tj7lfloZb fGN2KOi9WgaMEh5BDZO8tJJ+vaM3a8nrTmAsGuDwo2NfEucZ1fgwnjKRiiLBqHJr 7+52W8/ieEPc5wYMkeW0phkXyblc6A5HktPcpCOrjdnHFjxcQOMweoOP3K8C4Bb9 MglBEGgXGRlAkq08QIXqvEXhi65jvV87Hg8nqaSf+cgj+xm1CQuxMBTfMurVMo5r /msHc1Lk33nrNrZQYG/1ydKU7N5UCgqX/XldR9ISyww+vI64eN6hr81pzl6eYdbP fJDH7qtKbGRW5yQW+FCOPmCNJoiUyTCs056E99FJlVb59lHtOwaXYJ+Fp6EYoxuX s4uo2cUBhXfE6oRHfBxAMTKjCzzgpuHj+AZBJ3Cz0XgrH+zJQfAxw+jqJARY45Ke GXI4LNpwY03AQSfoyb0OxXTzUZEIehjrlUgMgeqi/uXU/ktuA8Q= =tlEx -----END PGP SIGNATURE----- --ZGiS0Q5IWpPtfppv--