ITEM: R2357L
Ridiculously long path in csh script
ENV:
AIX 3.2.5
DESC:
Customer is getting the following error message from a csh
script:
Warning: ridiculously long PATH truncated.
Is there some way to make the system accept this long PATH?
Action:
I investigated the csh source code and that is exactly where
the message is coming from... If there is no csh.cat file in
your NLSPATH or if you are using the C locale, you will get a
default message for the M_LONGPATH error. This default is
exactly the message the customer is seeing:
"Warning: ridiculously long PATH truncated".
It appears that the message was changed in the AIX message
catalogs to "Warning: long PATH truncated", but not in the
default message that is in the source code. I tried this
on a SunOS system and they give the "ridiculously" message
as well. It appears that this message is historical UN*X.
In the C Shell, the size of the buffer to hold the PATH is
hardcoded to 2*BUFSIZ or 8192 characters. BUFSIZ is set in
/usr/include/stdio.h to 4096:
\#define BUFSIZ 4096
Unfortunately, there is no way to increase the size of this
buffer without modifying the source code. Here are some
suggestions for the customer in determining how to circumvent
the limitation:
- Take a closer look at their PATH variable and make sure
that all of the paths specified are required. If this is
in a script, use the set command to view the value of PATH.
- How is the PATH variable set? It may have accidentally
gotten set in a loop of some sort.
- If all of the paths are valid, you may wish to build into the
logic of the program some sort of test having two different
PATH values depending on what is needed for this execution of
the script.
Support Line: Ridiculously long path in csh script ITEM: R2357L
Dated: February 1995 Category: N/A
This HTML file was generated 99/06/24~13:30:37
Comments or suggestions?
Contact us