Change in vdsm[master]: Add passwd command to vdsm-tool

shaohef at linux.vnet.ibm.com shaohef at linux.vnet.ibm.com
Wed Jun 6 06:16:56 UTC 2012


ShaoHe Feng has posted comments on this change.

Change subject: Add passwd command to vdsm-tool
......................................................................


Patch Set 9: Fails; I would prefer that you didn't submit this

(2 inline comments)

test, after subprocess.Popen with close_fds=True, father can close file descriptors.

....................................................
File vdsm-tool/passwd.py
Line 35:         f = open(constants.P_VDSM_LIBVIRT_PASSWD, 'r')
I think it is better to use ptyonic code.

Line 42:             stderr=subprocess.PIPE, close_fds=True)
http://docs.python.org/library/subprocess.html
If close_fds is true, all file descriptors except 0, 1 and 2 will be closed before the child process is executed. 
father process does not close file descriptors. it means it can not read the  file descriptors in subprocess, but father process  can.
so you can close the f in father process.

--
To view, visit http://gerrit.ovirt.org/4528
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I76b5aee4c2f11a7680c675c171ff35a463a70402
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Lei Li <lilei at linux.vnet.ibm.com>
Gerrit-Reviewer: Adam Litke <agl at us.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Lei Li <lilei at linux.vnet.ibm.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Ryan Harper <ryanh at us.ibm.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
Gerrit-Reviewer: Wenyi Gao <wenyi at linux.vnet.ibm.com>
Gerrit-Reviewer: Xu He Jie <xuhj at linux.vnet.ibm.com>


More information about the vdsm-patches mailing list