delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/01/13/03:42:30

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=GmzpYNPy5faZqFwx3kQjzBylpvZmZMQZWt0D7QPT46b/DpD7YxICd
GMJfLvb12axNgbyh251rv9SpCFQJVKeSSWwNTgzPKqMppFpiXtqbvL3+JdPD8LDu
K0kX4h8INldqjNtmS5ryEd2D5w10ilRIuQ9TUDjY+J1WCCCqyo+Abg=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=yuKU5QAADkM/SQWOnu8k78MqHd4=; b=C85oaE7puNvl5PkMD1ZEznHMKB41
IKHD0R2anuYCkuM3HGIsUcK7Gw8h7DCLysS7r44n1OtgPJP13+ZrNWdtYpzwk6Bm
4G9/PgikU2OCQ0SVkK1TFp2ph+XMH9j8ifNwzs+mjZDT3GtqEhsQYXwU5ZCDvFrZ
+4fK+7TG425XnqA=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-101.6 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=iron, Hx-languages-length:1978, enright, Enright
X-HELO: drew.franken.de
Date: Fri, 13 Jan 2017 09:41:47 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Hangs on connect to UNIX socket being listened on in the same process (was: Cygwin hanging in pselect)
Message-ID: <20170113084147.GF23119@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAOTD34aMu6DLP-8kaRXZRoihGxW9Jusf1pDBeM3cTWeNRfLVWw AT mail DOT gmail DOT com> <20170109141306 DOT GB843 AT calimero DOT vinschen DOT de> <CAOTD34b-h4WyYiUtA8sizN6riPe1YsDWdaypDNbODC71xv13UQ AT mail DOT gmail DOT com> <20170109171635 DOT GB26337 AT calimero DOT vinschen DOT de> <CAOTD34YeJJc_YXnWBq0HJou5Ka5Cj+qTRd+BgUti0hdzSX=8zg AT mail DOT gmail DOT com> <20170112221323 DOT GE23119 AT calimero DOT vinschen DOT de> <CAOC2fq9Q24wyBqCqx15oejCiOK88P41vgbZ5Rm0ZUZcxNzwVsg AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CAOC2fq9Q24wyBqCqx15oejCiOK88P41vgbZ5Rm0ZUZcxNzwVsg@mail.gmail.com>
User-Agent: Mutt/1.7.1 (2016-10-04)

--4VrXvz3cwkc87Wze
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Jan 12 16:54, Michael Enright wrote:
> On Thu, Jan 12, 2017 at 2:13 PM, Corinna Vinschen
> <corinna-cygwin AT cygwin DOT com> wrote:
> > Step 3:
> >
> >   If we did it really intelligent, maybe we finally also have a method
> >   to implement descriptor passing.  Finally.  After all these years.
> >
> > And maybe, we should not actually use the socket itself to exchange
> > the information but rather create some kind of side-channle for that.
> >
> > Especially in terms of step 3, I'm mulling over this for years now
> > and always something else got in the way and had to be done first.
> >
> >
>=20
> I made a program that needed to pass windows HANDLEs between processes
> and so that receiving process could access the shared memory
> represented by the HANDLEs. I was emulating facilities many programs
> implement using send_msg, but I was using Windows (named?) pipes. It
> felt a lot like what you need for send_msg, and it required newer
> Windows APIs. So by doing the crazy thing of completely rewriting your
> AF_UNIX sockets you could "easily" add descriptor passing.

/me spilled her coffee reading the word "easily".

I'm aware that named pipes have a facility to switch the user context,
which helps to handle the descriptor duplication.  I thought about this,
too, but it's really a lot of work since it doesn't fit well into the
current fhandler layout.

I'm not generally opposed to split off AF_LOCAL sockets from the generic
socket fhandler and rewrite it completely, but it took a long time
getting sockets to behave mostly POSIXy and I fear we introduce a
completely new set of POSIX incompatibilies which take another long time
to iron out.  That's why I suggested to use an additional named pipe
per AF_LOCAL socket as a side-channel.


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--4VrXvz3cwkc87Wze
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJYeJLLAAoJEPU2Bp2uRE+gcxUP/jJbAF+xa3ISCMP7zvJomS4f
4ku6mZzSyo1vWG2v1KGHSdyB+rWIHPhHJB0R5r2ibDrZdYmthYgG4goAG2/vQE4m
j/w/Ls0EABvAN4yTyPAAdXNszWqActyAMf6O8OsZ2P0TmMeQ/DPYBvVNzkVdzjQM
ZT+eRaZScLu1pSiouZl/hojzFFrJqJuon13rdlBdWXzjtJK8jRX7O9CM+6P3LgDm
Fs83/U5o3vlYOnOAZ6SbF+z7Oez/rIIjI+RI27aGc1Rw93HZs2A5KsF6piSqLHhx
f1aOJkbJrO+q/KPqDf5niIEOR5YQbMxuWocK59AjmeOSO9fQhAqUYln4DDE3SmXr
nHi9vBJE8O2v0SlwhmtjZwWT5gsyku40rWpGan6k6bVLhilJhS37HXLFkCWUfcTm
OgEB13IJhL4iXVq6kG1k/qU3AApuLD1axd5hBFM2CMMCdOuoPFHNagkGiFJ4SVsO
MwH6j0PtMmD2QVlxxaY5zqD8XILMXfOhYeoeWSx7AG60hXB+tynrNsuQlHtnXpNG
IvqSO1zugr4LNPx5sLGClXZrdi3T7lBKkMRtCrKpHZUL7tVpFceHXQekgT4WcvNQ
tAl7XP6LUFGqdbpEsreD13eRsQRTTtA1YOg0AWJlgYurnSVzocGWIlHnlIhO39Wm
YuTVdtTcto+cWH2uZwVK
=JNWS
-----END PGP SIGNATURE-----

--4VrXvz3cwkc87Wze--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019