SPUG: A bug?
Itay Furman
itayf at fhcrc.org
Tue Jul 15 17:16:59 CDT 2003
Hi,
The behavior described below seem to me to be a bug, but I'm not sure, since I
know nothing about 'ioctl'. In any case, I didn't find any FAQ, or other
message with similar description. I'd appreciate your opinion :-)
The following simple script, ioctl-test.pl, appears to behave differently
under different invocation schemes.
'ioctl-test.pl FILE'
prints
'Inappropriate ioctl for device'
and fails when tested for $!.
In contrast,
'cat FILE | ioctl-test.pl'
prints nothing (as expected? :-).
This behavior was consistent for different kinds of FILEs,
including when FILE is ioctl-test.pl itself.
# >> begin ioctl-test.pl <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< #
#!/usr/local/bin/perl -w
while (<>) {
#print "$! (($.))\n" if $!; # To see effect at every input line
}
print "$!\n" if $!;
# >> end ioctl-test.pl <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< #
BTW,
If actual command are included within the while(<>) {} loop, they are
processed correctly (!), at least for the cases that I've checked.
Thanks,
Itay
--
=========================================================================
Itay Furman
Fred Hutchinson Cancer Research Center (206) 667-5921 (voice)
1100 Fairview Avenue N., Mailstop D4-100 (206) 667-2917 (fax)
P.O. Box 19024
Seattle, WA 98109-1024
=========================================================================
More information about the spug-list
mailing list