README
changeset 0 7d3c07f8acfb
child 1 9ccc1574a367
equal deleted inserted replaced
-1:000000000000 0:7d3c07f8acfb
       
     1 This should demonstrate the use of LD_PRELOAD.
       
     2 
       
     3     hallo:	uses virgin puts(3) and readdir(3)
       
     4     myhallo:	uses modified puts(3) and readdir(3)
       
     5 
       
     6 If you set the environment 
       
     7 
       
     8     LD_PRELOAD=`pwd`/libmy.so.1.0.1
       
     9 
       
    10 the "hallo" should use the modified versions of the above
       
    11 funtions too.
       
    12 
       
    13 The modification is visibable, as puts(3) prints an
       
    14 extra string before the real output, and readdir(3) skips
       
    15 any directory entry starting with 'M'.
       
    16 
       
    17 No considerations done about race conditions and other nice things.
       
    18 It is just an nice example…
       
    19 
       
    20 -- 
       
    21 Heiko Schlittermann