refactor(vt): route VT control through dde-seatd#95
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: zccrs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
f650b58 to
7bc2336
Compare
There was a problem hiding this comment.
Pull request overview
This PR refactors VT (virtual terminal) handling in ddm to route VT discovery and switching through the dde-seatd control socket, removing the previous direct VT ioctl/signal-based implementation.
本 PR 重构了 ddm 的 VT(虚拟终端)处理流程:通过 dde-seatd 控制 socket 来完成 VT 查询与切换,并移除此前基于 VT ioctl/信号的实现。
Changes:
- Replace direct VT discovery/switching with
TreelandConnectorcontrol-socket requests (activeVt,findAvailableVt,switchVt).
用TreelandConnector的控制 socket 请求替代直接 VT 探测/切换(activeVt/findAvailableVt/switchVt)。 - Reduce
VirtualTerminalto only provide tty path formatting, removing legacy VT helpers.
将VirtualTerminal收敛为仅提供 tty 路径格式化,删除旧的 VT 辅助逻辑。 - Remove now-unused custom signal handling glue from
SignalHandler.
删除SignalHandler中已不再需要的自定义信号处理代码。
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/daemon/VirtualTerminal.h |
Removes legacy VT helper API, keeps only path(int).(删除旧 VT API,仅保留路径函数) |
src/daemon/VirtualTerminal.cpp |
Drops ioctl-based VT implementation; keeps tty path logic only.(移除 ioctl 实现,仅保留路径处理) |
src/daemon/TreelandConnector.h |
Adds VT control-socket API surface.(新增 VT 控制 socket 接口声明) |
src/daemon/TreelandConnector.cpp |
Implements VT control-socket protocol helpers and VT operations.(实现控制协议与 VT 操作) |
src/daemon/Display.cpp |
Switches greeter/session VT operations to TreelandConnector.(改用 TreelandConnector 进行 VT 切换/分配) |
src/daemon/Auth.cpp |
Requests VT switch via TreelandConnector before opening PAM session.(打开会话前通过 TreelandConnector 请求切 VT) |
src/common/SignalHandler.h |
Removes custom-signal API and state.(移除自定义信号相关接口与状态) |
src/common/SignalHandler.cpp |
Removes custom-signal socketpair + notifier logic.(移除自定义信号 socketpair/notifier 逻辑) |
2a00f90 to
b5f1d1c
Compare
fa66be1 to
ecd0a9b
Compare
ecd0a9b to
102df00
Compare
|
Addressed the valuable review findings on this branch:
I also re-checked the two Copilot comments on blocking / timeout handling:
Local validation: |
102df00 to
db95043
Compare
|
@copilot review |
db95043 to
d7599df
Compare
d7599df to
91c70dd
Compare
|
@copilot review |
91c70dd to
3b16901
Compare
|
@copilot review |
3b16901 to
a6c67bf
Compare
|
@copilot review |
a6c67bf to
986c0d3
Compare
|
@copilot review |
Move VT discovery and switching out of DDM and call dde-seatd through the control socket instead. 将VT查询与切换从DDM中移出,改为通过control socket调用dde-seatd。 Keep only tty path/control-tty handling in DDM and drop the old VirtualTerminal VT ioctl helpers plus unused signal glue. 在DDM中仅保留tty路径与control tty处理,删除旧的VirtualTerminal VT ioctl辅助逻辑及无用signal glue。 Log: 收口DDM中的VT控制 Influence: DDM不再直接执行VT_ACTIVATE等VT ioctl,VT状态机统一由dde-seatd处理。
986c0d3 to
e28afcf
Compare
|
@copilot review |
deepin pr auto review这是一次非常出色且大规模的重构。核心思路是将原本通过内核 以下是对本次代码变更的详细审查意见,分为语法逻辑、代码质量、代码性能和代码安全四个方面: 一、 语法与逻辑
二、 代码质量
三、 代码性能
四、 代码安全
总结本次重构质量很高,将原本深度的内核 VT 接口耦合剥离到 主要修改建议优先级:
|
Summary
VirtualTerminalto tty path handling only and remove the old VT ioctl helpersDependency
Test