WebProcess crashes during startup if libdispatch is initialized by WebProcessShim...
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Aug 2011 16:22:29 +0000 (16:22 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Aug 2011 16:22:29 +0000 (16:22 +0000)
commit41884ec78639c5f9c10ba176fddcd5185e616637
tree80f9d381dd68e9cec8e1a9f9214db8b3c66014a3
parentacdc65b2ff172f8bda749f9ec36e621e1e8afcfb
WebProcess crashes during startup if libdispatch is initialized by WebProcessShim.dylib
https://bugs.webkit.org/show_bug.cgi?id=66508
<rdar://problem/9828476>

Reviewed by Mark Rowe.

* mac/MainMac.cpp:
(closeUnusedFileDescriptors):
Check if a file descriptor is a kqueue and don't close it if that is the case. While this
isn't a complete fix, (it won't work if other initializers end up creating non-kqueue file descriptors)
it's good enough for Snow Leopard. For Lion, we should use the new posix_spawn API that lets you whitelist
file descriptors from the parent process.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@93420 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/mac/MainMac.cpp