Author Andrew.Gross
Recipients Andrew.Gross, ronaldoussoren
Date 2014-02-10.18:45:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1392057963.63.0.832878598113.issue20585@psf.upfronthosting.co.za>
In-reply-to
Content
In the latest OSX, 10.9, it looks like there have been some security changes related to inheriting file descriptors from parent to child processes.  While in the past it would allow you to inherit the parents open FDs, now it will kill the process. 

It looks like urllib2 does not properly unsubscribe from the KQUEUE after opening a remote connection, causing the process to be killed if you try use "evecv" style commands, or fork.

Simple Reproduction:
import urllib2
request = urllib2.urlopen('http://www.python.org')
response = request.read()
request.close()
os.execvp('ssh', ['ssh', 'user@1.2.3.4'])
# Killed: 9

I have attached the diagnostic crash report from OSX, appended to the end is a snippet from `lsof` showing the open KQUEUE file descriptor.
History
Date User Action Args
2014-02-10 18:46:04Andrew.Grosssetrecipients: + Andrew.Gross, ronaldoussoren
2014-02-10 18:46:03Andrew.Grosssetmessageid: <1392057963.63.0.832878598113.issue20585@psf.upfronthosting.co.za>
2014-02-10 18:46:03Andrew.Grosslinkissue20585 messages
2014-02-10 18:46:03Andrew.Grosscreate