develooper Front page | perl.perl5.porters | Postings from November 2000

[ID 20001120.005] Perl bug report

Thread Next
From:
Judah Greenblatt
Date:
November 20, 2000 09:38
Subject:
[ID 20001120.005] Perl bug report
Message ID:
3A196152.C73FD511@engineous.com
This is a bug report for perl from judah@engineous.com,
generated with the help of perlbug 1.28 running under perl v5.6.0.


-----------------------------------------------------------------
[Please enter your report here]

On Windows-NT only, quoted tabs in the command line of a pipe open
are translated to spaces.  The following program demonstrates the
problem:

	# demonstrate bug with NT pipe open

	open(XX, "echo \"\t\" |")
	  or die "cannot open pipe: $!\n";

	$i = <XX>;
	close XX;
	chomp $i;
	printf "|%s| (%03o)\n", $i, ord($i);

The program should print
	|	| (011)
but instead it prints
	| | (040)

This program works correctly on a Sun Sparc, and works correctly on NT
using Perl 5.004_04.

The error seems to be in nt/win32.c where it splits the shell
command into words.

Workaround:  If the command for the pipe contains unquoted
shell redirects such  as "</dev/null", the command will be passed to
the NT shell cm


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About