Q11867: C_FILE_INFO in Environment of Child Process
Article: Q11867
Product(s): See article
Version(s): 3.00 4.00 5.00
Operating System(s): MS-DOS
Keyword(s): ENDUSER | TAR55563 | mspl13_c
Last Modified: 25-AUG-1989
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. (Version 5.10 uses 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.
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
Copyright Microsoft Corporation 1986-2002.