OSX 10.6 open() implementation lacks O_CLOEXEC
Bug #995301 reported by
Paulo Lellis
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gearman |
Fix Released
|
Low
|
Brian Aker |
Bug Description
It's usual that the O_CLOEXEC macro definition resides in the file 'fcntl.h', usually located at /usr/include/sys/
In the OSX, the equivalent macro is FD_CLOEXEC instead.
In the file $TRUNK/
I never commit this change to the main trunk. Another option id to add the -DFD_CLOEXEC=1 in the makefile definitions.
Regards,
Lellis
Changed in gearmand: | |
milestone: | none → 0.34 |
summary: |
- OSX implementation doesn't have O_CLOEXEC Macro + OSX 10.6 open() implementation lacks O_CLOEXEC |
Changed in gearmand: | |
importance: | Undecided → Low |
status: | New → Fix Committed |
assignee: | nobody → Brian Aker (brianaker) |
Changed in gearmand: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
in time:
I replace the macro O_CLOSEXEC by FD_CLOEXEC as below:
pidfile.cc c_str() , O_CREAT| O_WRONLY| O_TRUNC| FD_CLOEXEC, S_IRWXU| S_IRGRP| S_IROTH) ) < 0)
121 int file;
122 if ((file = open(_filename.
Note that the trink must consider if it's a LINUX or a OSX box.