[Unison-hackers] Need a bit of ML help

Max Bowsher maxb at ukf.net
Sun Apr 17 21:19:17 EDT 2005


I'm working on a win32 gtk2 gui build, and have *almost* got there!

The one bizarre issue I have encountered is this, and I am hoping someone 
can help explain.

If unison is started AND the .unison directory does not exists AND the 
unison.exe was compiled with the subsystem windows linker option, and thus 
has no attached console, THEN-AND-ONLY-THEN, the program dies immediately 
without any indication of what went wrong at all.

This badness goes away if I comment out the following line from 
canonizeFspath in fspath.ml:
          Printf.eprintf "p = %s; bn = %s\n" p bn; flush stderr;

The truly bizarre thing is that this code is executed if the .unison 
directory exists, too, but in that case it is not causing the program to 
die.

Thus, my questions are:

1) Will Printf.eprintf, or flush, throw exceptions on output failure, which 
if uncaught, might cause the program to die without any message.

2) Is canonizeFspath called in different circumstances depending on whether 
the .unison directory exists or not, and might one be catching exceptions 
that the other does not?


Max.



More information about the Unison-hackers mailing list