Skip to content
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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

dehnert
Copy link
Member

@dehnert dehnert commented Feb 24, 2014

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.)

@dehnert
Copy link
Member Author

dehnert commented Feb 28, 2014

New version. Changes

  • local client uses subprocess
  • local client works with per-meeting operations (eg, ACLs)
  • CREATE_MTG support (new commit)
  • convenience function ensure_acl to append to an ACL (new commit)

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.
@dehnert
Copy link
Member Author

dehnert commented Mar 1, 2014

(Fixed Anders' comments.)

@dehnert
Copy link
Member Author

dehnert commented Mar 9, 2014

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)
Copy link
Member

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.

Copy link
Member Author

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.)

@vasilvv
Copy link
Member

vasilvv commented Mar 11, 2014

+1 to all commits given that the question regarding the purpose of fcntl invocation is answered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants