INF: C_FILE_INFO in Environment of Child Process

ID Number: Q11867

3.00 4.00 5.00 5.10 6.00 6.00a 6.00ax | 5.10 6.00 6.00a

MS-DOS | OS/2

Summary:

In Microsoft C versions 3.0, 4.0, 5.0, 5.1, 6.0, 6.0a, and 6.0ax, when

you shell from a C program (spawn a process), the environment will

appear to become corrupted with a ;C_FILE_INFO (or _C_FILE_INFO)

string. (Versions 5.1, 6.0, 6.0a, and 6.0ax use an underscore rather

than a semicolon.)

When a process is spawned, the C run time passes information about

open files to the child by inserting the identifier ";C_FILE_INFO" (or

"_C_FILE_INFO" -- no quotation marks in either case), followed by up

to 20 bytes, into the environment. During start-up, the C run time

reads the identifier, uses the information passed, and removes it from

the environment.

System() is implemented by spawning COMMAND.COM, and since COMMAND.COM

is not a C program, ";C_FILE_INFO" (or "_C_FILE_INFO") gets left in

the environment.

This behavior is harmless. The leading ";" (or "_") prevents any

collision with user-entered environment variables.

Additional reference words: 5.00 5.10 6.00 6.00a 6.00ax