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:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; q=dns; s=default; b=htufdGu /YkQOpNu0/ju7ElfqrH67X1S1ZnWkHTKNJ6M2NYXqjs+R33YpbZuLGn0TYy3RydG BtZmQLMbxvRxzBIn0k3UXO6qq04rn47wIN3GKfp7NkoIvYqvLsWFhoH4CGOlQDpv nzybkA98ZG10QihAxca+PCQg3ciAXcj8omiM= 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:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; s=default; bh=gkRlwiXTUkO6f ev/qPGN0k43raM=; b=b9YmUKJbg0YlzpunrfppUY+qGxKC6y5ezb5zqm4k7gnUD hEpvaVt636KsoHY7RyZsihGUYGNOr/MvkXGo7O//ZxCnhlqD7RPI0+KMFUscjzhq dLaRp9dG+KN5d9XgJrUB/5wla6bWDtt6B2kq0Ui+kv8bHOrC7HaFukoGQlCs4U= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=sk:peda AT ly, D*liu.se, sk:pedaly, cook X-HELO: mail-wj0-f172.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=BbgFyVv6nfjPmA1EZ9z4Saiqiat8v3Og26U1HO4J2bg=; b=fe50SPexnhB23QAe3lCeJ1mGmxcESqKJ4JhydhgBIxmXKa/YXjbNtW2naqXD51pthm K8CSU42P+q6Na7J72c/900BUKrYmPjyCIXqzYNePnVy/ImgOg/ePglZJtUkwB0mrsRpD awE45nesP1NYbSPU3PRsaqASVLzbT3sac6Zn0E69zTmA9Q4uWbFbPRN0J7URrzeyXu3I CXzjVqauhbUhdS5LiTedeyvHHOQfURhcFR9EIhJa29ojOADV4vznMPF23Gt3BVpSXL0I c15D4GSNFTSXZhR9rGP71Yvqtnj/Bhqdq1P/UaUFKGUnHoMbSyydJEfzKTy//1CiBZcE T5Og== X-Gm-Message-State: AKaTC00if9nTP/9Ioaalh+1X1zr+bgHkBa2BarNhwDrougrP4hK1QiyQNSL2GRcwaA0i9L1KJ2BV965NTxGo1g== X-Received: by 10.194.117.134 with SMTP id ke6mr27032546wjb.123.1480500551341; Wed, 30 Nov 2016 02:09:11 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <237e4e33-4b51-a124-4108-d67e715dcbf0@lysator.liu.se> References: <20161117140012 DOT GA23664 AT calimero DOT vinschen DOT de> <98eb08bf-5012-fe14-b10c-241b427c4366 AT cs DOT umass DOT edu> <2925977 DOT 20161129192741 AT yandex DOT ru> <583E1D4A DOT 4020703 AT gmx DOT de> <111bc961-5f69-8e27-f78a-2b82f351d811 AT cs DOT umass DOT edu> <237e4e33-4b51-a124-4108-d67e715dcbf0 AT lysator DOT liu DOT se> From: Erik Bray Date: Wed, 30 Nov 2016 11:09:10 +0100 Message-ID: Subject: Re: Retrieving per-process environment block? To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes On Wed, Nov 30, 2016 at 10:15 AM, Peter Rosin wrote: > On 2016-11-30 04:00, Eliot Moss wrote: >> On 11/29/2016 7:28 PM, Herbert Stocker wrote: >> >>> Or we simply copy the variables unconverted to the Windows environment >>> block, as the Windows env block is not used for anything else - up to >>> now it is not updated at all. >> >> Maybe we could stash them inside one large variable? Would that help >> at all? (It does demand a quoting convention, but since this is all >> internal stuff, that may not be too hard.) > > I believe this is a dead end. The Windows environment block has an > unacceptable size limit which is circumvented by the internal Cygwin > handling. Since this is about exposing said Cygwin environment, it > would simply not work for big environments. I agree--although I can't off the top of my head recall where I've read this, I believe there's a deliberate effort in Cygwin to keep the Windows environment to the bare minimum for Cygwin processes. Among other things I imagine it keeps the number of conversions necessary to a minimum. And in any case, trying to cache the entire Cygwin environment back into the Windows environment would be even more overhead than what I'm proposing which is to store it in shared memory. My goal is not to make the Cygwin environment of a process readable from outside Cygwin--only make it so it can be read from other Cygwin processes by way of /proc (given the necessary permissions). Perhaps I'll go ahead and cook up a patch and see what impact it has. With luck it won't be much--I just don't know how much overhead there is in open_shared. Thanks, Erik -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple