首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
V2EX
›
问与答
rust on Linux 怎么做单例进程比较好(进程互斥)
proxytoworld
·
2022-09-13 10:38:29 +08:00
· 1019 次点击
这是一个创建于 1097 天前的主题,其中的信息可能已经有所发展或是发生改变。
Rust
进程
Linux
斥
6 条回复
•
2022-09-14 02:12:49 +08:00
1
gydi
2022-09-13 10:49:45 +08:00
占端口
2
lmshl
2022-09-13 10:50:50 +08:00
通用做法是锁一个文件,比如<你的 app.pid>
3
lmshl
2022-09-13 10:52:04 +08:00
看这一段
https://www.baeldung.com/linux/pid-file#ensuring-a-single-instance-of-an-application
4
novolunt
2022-09-13 11:11:11 +08:00
用 wasm
https://github.com/lunatic-solutions/lunatic-rs
5
fuxkcsdn
2022-09-13 11:13:59 +08:00
linux 通用做法是 pid 文件锁吧
6
ecloud
2022-09-14 02:12:49 +08:00
/var/run/xxx.pid
关于
·
帮助文档
·
自助推广系统
·
博客
·
API
·
FAQ
·
实用小工具
·
874 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 23ms ·
UTC 20:09
·
PVG 04:09
·
LAX 13:09
·
JFK 16:09
Developed with
CodeLauncher
♥ Do have faith in what you're doing.
❯