2

I'm using this fslogger.c to get File System Notifications in my Mac. But it works only in Leopard & SnowLeopard, not in Lion or Mountain Lion.

http://osxbook.com/software/fslogger/download/fslogger.c

when trying to clone the /dev/fsevents using ioctl it returns the error number 14(Bad Address). I have tried fixing it,i thought it could be some issues in ioctl function arguments. So i have tried modifying that, but no use at all. I couldn't get that fixed at all. Any idea how to make it work for Lion & Mountain Lion.

1 Answer 1

2

From Lion Onwards, the Security has been increased. So i have to open the file with a Third argument "S_IROTH". That will give access to /dev/fsevents device stream. Hope this is helpful to someone like me.

4
  • Where exactly the error was? and how did you fix it? can you describe it in more detail?
    – REALFREE
    Apr 19, 2013 at 2:59
  • When you try to clone the /dev/fsvents stream after getting the file descriptor, it will give the above error. Apr 20, 2013 at 10:27
  • Actually I was able to compile and run but output is not right except string and what io was called. Uid, gid, permission bits do not look right because they are all same overall. Not sure how to fix this
    – REALFREE
    Apr 22, 2013 at 23:25
  • Sorry for the late reply, can you post the Mac OS X Version and the output you got. Apr 30, 2013 at 19:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.