Alan Chipperfield wrote :
> I think the code in HDS is rec1_get_path.c and
> rec1_find_file.c. It appears that the presence of + in an
> otherwise fully resolved file name will cause the shell
> expansion unless HDS_SHELL is -1. I had thought the only
> thing involved in the expansion was globbing (hence my query
> about +) but I now see that awk may be involved. This needs
> more study - I've set Brian on it.
HDS scans every character in the full path name and classifies the
filename as "special" (meaning a perceived need to use the shell to expand
the name) or not in rec1_get_path.c
The reason that "-" is not special but "+" is is due to the following logic
/* no action on these.
*/
case '_':
case '-':
break;
/* If any other characters which are not in the POSIX.1 portable filename
*/
/* character set are encountered, then note that the file name contains
*/
/* special characters.
*/
default:
if ( !isalnum( fname[ i ] ) )
{
special = 1;
}
break;
Then the routine rec1_find_file.c will, for "special" files, fork the shell
(csh/tcsh or sh), send a shell script on stdin and read the resulting names
on stdout.
The questions are:-
1) Should HDS use a wider range of characters than Rodney believed as part
of "normal" names?
2) Why is the forked shell not starting correctly for some versions of Perl?
Brian
|