Avoid crash on OS X: guarded fd exception
On OS X, a file descriptor that shows up as being of type "KQUEUE" in lsof output is apparently created behind the scenes when starting a thread. (Related to BSD kernel event queues: see man kqueue.) When we re-exec ourselves on OS X, and then close all file descriptors >= 3, closing such a KQUEUE fd causes a crash. Guard against this by closing only regular files. Change-Id: I5011bfbaed156b04248b6bddb2a1a58624bee3d4 5011bfbaed156b04248b6bddb2a1a58624bee3d4
Showing
Please
register
or
sign in
to comment