Zhou Zheng Sheng has posted comments on this change.
Change subject: [WIP]Add text-based console support
......................................................................
Patch Set 1: (1 inline comment)
....................................................
File vdsm/consoleServer.py
Line 237: if len(buf) == 0:
Line 238: self._logger.info("ssh channel closed")
Line 239: break
Line 240:
Line 241: os.write(self._input.fileno(), buf)
In "__main__", sys.stdin is given as "inputf" in "__init__", then "inputf" is
assigned to "self._input". So write to "self._input" here is actually write to
"sys.stdin". Why we write to "sys.stdin"?
After reading the code, I find that "sys.stdin" and "sys.stdout" are both
redirected to the console pty, so they are interchangeable, but I still think
the naming is a bit confused to me.
Line 242: elif self._output in rd:
Line 243: buf = os.read(self._output.fileno(), 1)
Line 244:
Line 245: if chan.send(buf) == 0:
--
To view, visit http://gerrit.ovirt.org/7165
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I69904bf7aafd4f764a256d4075c9bf71d988e7c5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Xu He Jie <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
Gerrit-Reviewer: Royce Lv <[email protected]>
Gerrit-Reviewer: Ryan Harper <[email protected]>
Gerrit-Reviewer: Xu He Jie <[email protected]>
Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches