public inbox for
help / color / mirror / Atom feed
From: Jon Turney <>
Cc: "Matt D." <>
Subject: Re: -displayfd outputting some garbage?
Date: Thu, 09 Feb 2017 00:44:00 -0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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]


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:
Problem reports:

      reply	other threads:[~2017-02-09  0:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
2017-02-08  1:02 ` Matt D.
2017-02-09  0:44   ` Jon Turney [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).