Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
18
Star
15
Fork
20
openEuler
/
oeDeploy
Code
Issues
21
Pull Requests
0
Wiki
Insights
Pipelines
Service
JavaDoc
PHPDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
Don’t show this again
149
feat: 优雅关闭服务器的功能
Merged
openforks:master
openEuler:master
wangtsingx
create on 2025-10-10 17:46
Clone/Download
HTTPS
SSH
Copy
Email Patch
Diff file
1. feat: 优雅关闭服务器的功能 修改了MCP OEDP插件的代码,添加了优雅关闭服务器的功能。主要变更包括: 1. 添加了信号处理模块导入: - `import signal` - `import sys` 2. 增加了信号处理函数[signal_handler](./oedp-mcp/mcp-oedp/mcp-oedp.py#L548-L551),用于捕获SIGINT(Ctrl+C)和SIGTERM信号,实现优雅关闭: ```python def signal_handler(sig, frame): """处理信号,优雅关闭服务器""" print("Shutting down server gracefully...") sys.exit(0) ``` 3. 在main函数中注册信号处理器: ```python # 注册信号处理器以实现优雅关闭 signal.signal(signal.SIGINT, signal_handler) signal.signal(signal.SIGTERM, signal_handler) ``` 现在使用Ctrl+C停止服务器时,应该会看到"Shutting down server gracefully..."的提示信息,并且不会有错误报告。
This pull request needs to pass some approval items
Type
Assign personnel
Status
Reviewer
openeuler-ci-bot
solarhu
cmss_dx
栾建海
snoweay
luzhihao
hjx_gitff
Lostway
yangzhao_kl
dowzyx
chen wei
kefei
Completed
(0/0 )
Tester
openeuler-ci-bot
Completed
(0/0 )
How to merge Pull Request
git checkout master
git pull https://gitee.com/openforks/oeDeploy.git master
git push origin master
Comments
5
Commits
1
Files
1
Checks
Code problems
0
Bulk operation
Expand
Collapse
Reviewer
Code Owner
Reviewer
栾建海
luanjianhai
solarhu
solarhu
cmss_dx
cmss_dx
hjx_gitff
hjx_gitff
snoweay
snoweay
luzhihao
MrRlu
Lostway
Lostwayzxc
yangzhao_kl
yangzhao_kl
dowzyx
dowzyx
chen wei
chenwei_kernel
kefei
byrobins
randy1568
randy1568
Dingjiahui
dingjiahuichina
openeuler-ci-bot
openeuler-ci-bot
No Setting
Min number
0
Tester
栾建海
luanjianhai
solarhu
solarhu
cmss_dx
cmss_dx
hjx_gitff
hjx_gitff
snoweay
snoweay
luzhihao
MrRlu
Lostway
Lostwayzxc
yangzhao_kl
yangzhao_kl
dowzyx
dowzyx
chen wei
chenwei_kernel
kefei
byrobins
randy1568
randy1568
Dingjiahui
dingjiahuichina
openeuler-ci-bot
openeuler-ci-bot
No Setting
Min number
0
Priority
Not specified
Serious
Main
Secondary
Unimportant
Label
openeuler-cla/yes
lgtm
approved
sig/sig-ops
Link Issue
No link issue
Successfully merged pull requests will close issues
Milestone
No related milestones
Participators
(3)
1
https://gitee.com/openeuler/oeDeploy.git
git@gitee.com:openeuler/oeDeploy.git
openeuler
oeDeploy
oeDeploy
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register