From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49476 invoked by alias); 9 Feb 2017 00:44:53 -0000 Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Reply-To: cygwin-xfree@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com Received: (qmail 49466 invoked by uid 89); 9 Feb 2017 00:44:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=H*Ad:U*matt, 0x00, 0x0a, H*f:sk:589A6A7 X-HELO: out1-smtp.messagingengine.com Received: from out1-smtp.messagingengine.com (HELO out1-smtp.messagingengine.com) (66.111.4.25) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 09 Feb 2017 00:44:42 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 43B4520944; Wed, 8 Feb 2017 19:44:40 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Wed, 08 Feb 2017 19:44:40 -0500 X-ME-Sender: Received: from [192.168.1.102] (host86-184-210-45.range86-184.btcentralplus.com [86.184.210.45]) by mail.messagingengine.com (Postfix) with ESMTPA id A318F7E2E6; Wed, 8 Feb 2017 19:44:39 -0500 (EST) Subject: Re: -displayfd outputting some garbage? To: cygwin-xfree@cygwin.com References: <589A6A71.4000703@gmail.com> <589A6E11.8060704@codespunk.com> From: Jon Turney Cc: "Matt D." Message-ID: <6112354f-7eac-2d9e-e059-9bf065ea4b42@dronecode.org.uk> Date: Thu, 09 Feb 2017 00:44:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <589A6E11.8060704@codespunk.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2017-02/txt/msg00002.txt.bz2 On 08/02/2017 01:02, Matt D. wrote: > On 2/7/2017 7:46 PM, Matt D. wrote: >> I have an xinit script which outputs the display id to a file with the >> following option: >> >> xinit .. -displayfd 3 3>$HOME/.display Thanks for reporting this. For future issues, can I ask you to use the cygwin list, per [1] [1] https://cygwin.com/ml/cygwin-xfree-announce/2015-03/msg00001.html I hope you mean ' xinit -- -displayfd 3 3>$HOME/.display' >> This outputs correctly '0' but appends 0x00 and 0x0A. Why is it >> outputting a null byte and this 0x0A? Yeah, this seem to be a bug in xinit (which needs to insert itself into the displayfd pipeline to learn the display number for it's own purposes) $ X -displayfd 3 3>~/.display [...] $ xxd ~/.display 00000000: 300a 0. $ xinit -- -displayfd 3 3>~/.display [...] $ xxd ~/.display 00000000: 3000 0a 0.. > This is causing issues where I try to perform: > > echo $(cat .display) > > Which results in: > > bash: warning: command substitution: ignored null byte in input > 0 This warning is new in bash 4.4, I think. I think this is a just a warning though, and shouldn't actually cause any issues? -- Jon Turney Volunteer Cygwin/X X Server maintainer -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/