Microsoft KB Archive/82216

= Command Piped in Root Directory May Hang Machine =

Article ID: 82216

Article Last Modified on 7/7/2005

-

APPLIES TO


 * Microsoft MS-DOS 5.0 Standard Edition
 * Microsoft MS-DOS 5.0a
 * Microsoft MS-DOS 6.0 Standard Edition
 * Microsoft MS-DOS 6.2 Standard Edition
 * Microsoft MS-DOS 6.21 Standard Edition
 * Microsoft MS-DOS 6.22 Standard Edition
 * Microsoft Windows 3.0 Standard Edition
 * Microsoft Windows 3.0a
 * Microsoft Windows 3.1 Standard Edition
 * Microsoft Windows 3.11 Standard Edition

-



This article was previously published under Q82216



SYMPTOMS
If you run an MS-DOS command in a root directory that contains the maximum allowable number of directory entries, and redirect the output by using a pipe character (|), your system may stop responding (hang).



CAUSE
MS-DOS provides the means to direct the output of one command as input to another using a redirection technique known as &quot;piping.&quot; Because MS-DOS is a single-tasking environment, these pipes are created via temporary files on disk.

MS-DOS checks for the presence of an environment variable called TEMP specifying the drive and directory where such temporary files should be placed. If no TEMP variable or directory exists, MS-DOS uses the current directory.

If the output from one command is piped to another when the current directory is a root directory that already contains the maximum number of directory entries (for example, 512 files for fixed disks,) the inability to create the temporary files may stop (hang) the machine.



RESOLUTION
To eliminate this problem, do the following:


 * Delete or move some files from the root directory to create space for additional directory entries. -or-


 * Create an X:\TEMP directory and place a SET TEMP=X:\TEMP statement in the AUTOEXEC.BAT file. The temporary files created by the pipe are then placed in the X:\TEMP directory, where X: is a valid MS-DOS logical drive.



STATUS
Microsoft has confirmed this to be a problem in MS-DOS. We are researching this problem and will post new information here as it becomes available.

