Re: [PATCH v2 6/7] tests: Add tests for automatic use of pager

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

 



Don't the following pager settings suffer from a race condition?

> +	cat > $less <<-EOF &&
> +	#!$SHELL_PATH
> +	: > default_pager_used
> +	EOF

> +	PAGER=": > PAGER_used" &&

> +	PAGER=: &&

> +	git config core.pager ": > core.pager_used" &&

> +	git config core.pager : &&
> +	GIT_PAGER=": > GIT_PAGER_used" &&

They depend on that the subsequent 'git log' writes to the pipe (and does
not fill it) before the pager can run. If the pager runs first and
completes, and then 'git log' writes to the pipe, it will die from
SIGPIPE, won't it?

I suggest to rewrite all ':' to something that processes stdin, eg. 'wc'
(not 'cat', because this is a magic token).

-- Hannes
--
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]