-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancements to python-discuss from the pergamon project #6
base: master
Are you sure you want to change the base?
Conversation
New version. Changes
|
The normal discuss clients will run disserve when connecting to a local discuss server, which is potentially handy for utilities running on the discuss server that don't have convenient access to a keytab. This adds support for that mode of operation to pydiscuss as well.
(Fixed Anders' comments.) |
Two more commits (one of which should arguably be a change to commit bbdeffa instead). I can break these out into another pull request if that's preferable. |
pair = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM) | ||
subprocess.Popen([self.cmd], stdin=pair[1], close_fds=True) | ||
pair[1].close() | ||
fcntl.fcntl(pair[0].fileno(), fcntl.F_SETFD, fcntl.FD_CLOEXEC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel confused by the purpose of that line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ummm... Most specifically, if we fork and exec, we shouldn't pass the socket pair into the child. I'm guessing I got that from some "here's how to do sockets in Python". It seems like probably a reasonable general practice in a library, to avoid impacting any exec'd children. shrug I'm certainly not devoted to keeping it.
(I, um, clearly managed to miss/forget/something this comment.)
+1 to all commits given that the question regarding the purpose of fcntl invocation is answered. |
The normal discuss clients will run disserve when connecting to a local discuss
server, which is potentially handy for utilities running on the discuss server
that don't have convenient access to a keytab. This adds support for that mode
of operation to pydiscuss as well.
(I suspect this wants some changes before being merged, but it'd be nice to know what sorts of changes you want, rather than trying to guess.)