Changes between Version 13 and Version 14 of PortingTips


Ignore:
Timestamp:
Jun 26, 2017, 12:15:17 PM (7 years ago)
Author:
dmik
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PortingTips

    v13 v14  
    8080Note that this will cause **all** applications linked against `LIBCxyz.dll` to create a log file named `libc-ABCD.log` in the application's current directory where ABCD is a hex number of a running process. Given that we disabled all logging by `SET LIBC_LOGGING=-ALL` in CONFIG.SYS, these files will only contain a small log header and won't grow at runtime — this is done to avoid excessive logging for unneeded applications and unnecessary slowdown caused by this logging.
    8181
    82 In order to get anything useful in the log file, you need to enable logging for your application. This is done by overriding the `LIBC_LOGGING` environment value before starting it. To enable full logging, just do
     82In order to get anything useful in the log file, you need to enable logging for your application. This is done by overriding the `LIBC_LOGGING` environment variable before starting it. To enable full logging, just do
    8383{{{
    8484SET LIBC_LOGGING=+ALL
     
    9191If you want to go back to the normal LIBC version, just unlock `LIBCxyz.dll`, rename it back to `LIBCxyz.logchk`, rename `LIBCxyz.dll.normal` to `LIBCxyz.dll` and reboot.
    9292
    93 Note that while technically you could copy `LIBCxyz.logchk` to a separate directory, rename it to `LIBCxyz.dll` there and then set BEGINLIBPATH=<DIR> and LIBPATHSTRICT=T in the environment to have this version of LIBC used for your process without rebooting, this will not work well. Doing so will lead to having two **different** LIBC copies in memory which don't cooperate because of the LIBC design that assumes there is only one active LIBC DLL at a time. In particular, having more than one DLL it is known to make forked children crash with some weird errors (even if one manages to separate shared structures of different LIBC versions by using unique mutex and shared memory names).
     93Note that while technically you could copy `LIBCxyz.logchk` to a separate directory, rename it to `LIBCxyz.dll` there and then set BEGINLIBPATH=<DIR> and LIBPATHSTRICT=T in the environment to have this version of LIBC used for your process without rebooting, this will not work well. Doing so will lead to having two **different** LIBC copies in memory which don't cooperate because of the LIBC design that assumes there is only one active LIBC DLL at a time. In particular, having more than one DLL in memory is known to make forked children crash with some weird errors (even if one manages to separate shared structures of different LIBC versions by using unique mutex and shared memory names).