Re: [PATCH 2/2] pager_in_use: make sure output is still going to pager

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 10, 2015 at 06:38:10PM +0200, Johannes Schindelin wrote:

> > +const char *pipe_id_get(int fd)
> > +{
> > +	static struct strbuf id = STRBUF_INIT;
> > +	struct stat st;
> > +
> > +	if (fstat(fd, &st) < 0 || !S_ISFIFO(st.st_mode))
> > +		return NULL;
> 
> Just a quick note: it seems that this check is not really working on
> Windows. I tested this by running this test case manually (because TTY
> is not set on Windows):

Yeah, I'm not too surprised. I'm guessing your st_ino for pipes are all
just the same or something. Or maybe S_ISFIFO doesn't pass (we don't
technically need it, I don't think, and could just drop that check).

Anyway, I had planned that we would need to stick a big "#ifdef WINDOWS"
around these two functions.

> I hope to find some time tomorrow to figure out some workaround that
> makes this work on Windows.

Cool. I can't comment on Windows-specific stuff, but I'm happy to review
the rest of it. :)

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]