Here it is :I did a tar.bz2 with all the originals files except inotify.ml and inotify_stubs.c. I also let in there the file hello2.txt which is the stderr output.
cd ocaml_inotify-0.7_modified sudo make uninstall && make clean && make && sudo make installocamlc unix.cma -I /usr/lib/ocaml/3.10.2/inotify/ inotify.cma -o test_err test.inotify.ml
mkdir /tmp/dev ./test_err /tmp/dev 2> hello2.txt mkdir /tmp/dev/a cat hello2.txt We're in inotify_stubs.c # bytes returned from ioctl: 32 From here, we're in inotify.ml # toread (it's what we get from inotify_stubs) : 32 Length of string 'a' = 16 Let's iterate on this string to print all chars :'a' '' '' '' '' '' '' '' '' '' '' '' '' '' '' ''
As you can see with the '', there are too much \0 in the string but I think the line "Length of string 'a' = 16" speaks for itself.
Grégory BELLIER.
Attachment:
ocaml_inotify-0.7_modified.tar.bz2
Description: Binary data