<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">OK, after a little detective work, I think I understand… :-)<div class=""><br class=""></div><div class="">There are currently two file-watching modules in Unison:</div><div class=""><ul class="MailOutline"><li class="">fswatchold.ml, the older one (surprisingly enough), calls fsmonitor.py</li><li class="">fswatch.ml, the newer one, seems to work only on Linux and Windows; it calls unison-fsmonitor, which is an OCaml program (found in the fsmonitor subdirectory) that is built separately from Unison.  They use a somewhat fancier protocol to communicate.  </li></ul><div class="">If you look around the rest of the code, you’ll see calls to both modules.  But calls to Fswatchold functions are forwarded to Fswatch if the newer monitor is running.</div><div class=""><br class=""></div><div class="">So you’re correct that fsmonitor.py is not the right place to start for you.  You probably want to clone fsmonitor/linux and go from there.</div><div class=""><br class=""></div><div class="">Best,</div><div class=""><br class=""></div><div class="">    - Benjamin</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 31, 2015, at 2:01 AM, Chris Stankevitz <<a href="mailto:chris@stankevitz.com" class="">chris@stankevitz.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">Can someone explain this discrepancy in the 2.48.3 source distribution:<br class=""><br class="">1. fswatch.ml describes (and implements) a notification protocol in which stdin/stdout is used to communicate messages such as VERSION, OK, DIR, LINK, CHANGE, etc<br class=""><br class="">2. fsmonitor.py implements a notification protocol but it does not send or receive any of the commands in (1).  Furthermore it does not send commands to stdout, rather it writes them to a file called "changes" in a way that does not agree with (1).<br class=""><br class="">What I was expecting to see:<br class=""><br class="">3. fswatch.ml describe a protocol<br class=""><br class="">4. fsmonitor.py implements the protocol in (3)<br class=""><br class="">The reason I am asking: I would like to add freebsd support to the fsmonitor process.... but I am not confident that fsmonitor.py is the correct starting place.<br class=""><br class="">Thank you,<br class=""><br class="">Chris<br class="">_______________________________________________<br class="">Unison-hackers mailing list<br class=""><a href="mailto:Unison-hackers@lists.seas.upenn.edu" class="">Unison-hackers@lists.seas.upenn.edu</a><br class="">http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers<br class=""></div></blockquote></div><br class=""></div></div></body></html>