Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

O_EVTONLY doesn't exist on FreeBSD #26

Open
MartinNowak opened this issue Mar 18, 2015 · 4 comments
Open

O_EVTONLY doesn't exist on FreeBSD #26

MartinNowak opened this issue Mar 18, 2015 · 4 comments

Comments

@MartinNowak
Copy link
Contributor

The O_EVTONLY you're using is O_NOCTTY on FreeBSD.


I'd suggest to use O_RDONLY on FreeBSD as a replacement.

Most of the constants in this file are available in druntime, btw.

@MartinNowak
Copy link
Contributor Author

https://github.com/D-Programming-Language/druntime/blob/master/src/core/sys/freebsd/sys/event.d

I was sure someone added the corresponding osx header, but apparently it's still missing.

@MartinNowak
Copy link
Contributor Author

Ah mixed that up with epoll on linux.
dlang/druntime#301
Could you do me the favor and make a pull for core.sys.osx.sys.event?

@etcimon
Copy link
Owner

etcimon commented Mar 18, 2015

Could you do me the favor and make a pull for core.sys.osx.sys.event?

Yes, I have a pull request on now: etcimon/druntime@933f281

The O_EVTONLY you're using is O_NOCTTY on FreeBSD.

I haven't had time to look into it much, but O_RDONLY seems to be 0x00. I guess I'll just ignore this for the moment and fix it once druntime has all the headers.

As a side note, the directory watcher on BSD / OSX was a little hard to get right. You should read the notes here: https://github.com/etcimon/libasync/blob/master/source/libasync/posix.d#L1472

@MartinNowak
Copy link
Contributor Author

It kind of worked out, we don't need detailed changes info in dub right now, only a notification that something changed. Later we might optimize for change infos to speedup rebuilding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants