Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WlyFj-0007dq-KK for pgsql-bugs@arkaria.postgresql.org; Sun, 18 May 2014 10:23:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WlyFj-0000GS-30 for pgsql-bugs@arkaria.postgresql.org; Sun, 18 May 2014 10:23:35 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WlyFi-0000GL-29 for pgsql-bugs@postgresql.org; Sun, 18 May 2014 10:23:34 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WlyFf-000646-LW for pgsql-bugs@postgresql.org; Sun, 18 May 2014 10:23:33 +0000 Received: from intern.anarazel.de (unknown [89.204.135.74]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 21EAA4E8003; Sun, 18 May 2014 12:23:30 +0200 (CEST) Date: Sun, 18 May 2014 12:23:24 +0200 From: Andres Freund To: derek_ealy@rapid7.com Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #10347: Can't write password to psql or pg_dump Message-ID: <20140518102324.GV23662@alap3.anarazel.de> References: <20140516203409.16847.6130@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140516203409.16847.6130@wrigleys.postgresql.org> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Hi, On 2014-05-16 20:34:09 +0000, derek_ealy@rapid7.com wrote: > On Windows systems the psql or pg_dump process always hangs after sending > the password to stdin of the process. > > I've gotten around this problem by setting an environment variable before > exec'ing the process. I set OSTYPES=msys. This forces psql to use stdin when > reading the password. I think the important point - and why I asked for a bugreport after talking about it on irc - is that sprompt.c on windows uses CONIN$/CONOUT$ for io. Ignoring stdin/stdout except when the OSTYPE is set to msys. Given that CONIN$/OUT seem to refer to the shell that started a processtree from a shell that doesn't seem to be optimal. That said, I am not a big fan of relying on sending the passwort to stdin... Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs