I built 64-bit version of Firebird (OS X 10.10, AppleClang 6.0.0, Xcode 6.2).
The symbol O_CLOEXEC is present, but as you see it has negative effect
on socket() call.

By the way the build is broken on the latest trunk . I used older
revision to test with Xcode (61006).
Trunk build log - http://pastebin.com/6eLBXVnK

On 30 March 2015 at 11:26, Michal Kubecek <m...@mk-sys.cz> wrote:
> On Mon, Mar 30, 2015 at 10:33:16AM +0300, Alex Peshkoff wrote:
>> On 03/29/15 21:56, Egor Pugin wrote:
>> > I ran fbserver from Xcode and the standard socket() function cannot
>> > create socket.
>> > remote/inet.cpp:3060
>> > fd = ::socket(domain, type | O_CLOEXEC, protocol);
>> > (The execution does not go into the next if statement. It seems errno
>> > has other value than specified in the condition.)
>> >
>> > Without the 'O_CLOEXEC' flag the server starts well.
>> > fd = ::socket(domain, type, protocol);
>>
>> O_CLOEXEC was added in FB3 in order to better support fork() in user code.
>
> According to my socket(2), it should be SOCK_CLOEXEC rather than
> O_CLOEXEC (but these constants seem to be equal on most architectures).
>
> Michal
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> Firebird-Devel mailing list, web interface at 
> https://lists.sourceforge.net/lists/listinfo/firebird-devel



-- 
Egor Pugin

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to