当前位置:网站首页>Background running program method
Background running program method
2022-07-18 14:53:00 【Alkali!】
(cmd &)
Every command line terminal is a shell process , The programs you execute in this terminal are actually this shell Sub processes divided by processes . Under normal circumstances ,shell The process will block , Wait for the subprocess to exit before receiving the new command you entered . add & Number , Just let shell The process is no longer blocked , You can continue to respond to your new orders . But anyway , If you turn this off shell Command line port , All subprocesses attached to it will exit .
and (cmd &) Run the command like this , It is take cmd The order hangs on a systemd Under the name of system daemons , recognize systemd Be a father , So when you exit the current terminal , For what just happened cmd The order has no effect at all .
nohup
nohup some_cmd &
nohup The principle is very simple , After the terminal is shut down, it will send SIGHUP The signal , While using nohup The running process will Ignore this signal , Therefore, the process will not exit after the terminal is shut down .
Compare
(cmd &) This form is more stable
边栏推荐
- Remove the problem of repeated letters (the minimum sequence of different characters)
- [每周一更]-(第3期):Web开发安全注意事项
- 紫光同创 FPGA 开发跳坑指南(五)—— DDR3 控制器 IP 的仿真
- Why should e-commerce platforms focus on the crime of illegal operation? What is the connection between this and Erqing?
- HAL 固件库
- 小程序毕设作品之微信评选投票小程序毕业设计(8)毕业设计论文模板
- Minimum interval problem
- STM32通用定时器
- Design of intelligent speech recognition Bluetooth headset based on wtk6900h speech recognition single chip
- AcWing 3433. 吃糖果 递推|找规律
猜你喜欢

ViewGroup事件分发梳理

启动失败 Failed to determine a suitable driver class 问题解决方案

Data agility, HTAP database determines both efficiency and life and death

HAL 固件库

About mock third-party calls

6. Redis architecture design to use scenarios - persistence mechanism, cache invalidation strategy, cache hit rate

STM32通用定时器

Hal firmware library

Tens of billions of data were compressed to 600gb, and tdengine was launched on GCL energy mobile energy platform

小程序畢設作品之微信評選投票小程序畢業設計(5)任務書
随机推荐
数百亿数据压缩至 600GB,TDengine 落地协鑫能科移动能源平台
C 库函数 - sscanf()用法
About mock third-party calls
Win11 system How to enable Net Framework 3.5?
STM32 USB virtual serial port communication
通过装饰器获取调用函数的文件名称及函数名称
Design of intelligent speech recognition Bluetooth headset based on wtk6900h speech recognition single chip
出海已成大势,技术如何赋能?| ArchSummit
全排序问题
前 K 个高频元素问题
风控人不能不知的黑产大揭秘
[every Monday shift] - Issue 3: web development security precautions
Antd a-upload limit the number of uploads when multiple is true
博云入选 Gartner 中国云管理工具市场指南代表厂商
Reconstructing the geometric form of weight space with training set
Wechat selection and voting of applet completion works applet graduation design (5) assignment
小程序毕设作品之微信评选投票小程序毕业设计(8)毕业设计论文模板
Please ask a question: does the flinkcdc need root permission to synchronize MySQL data?
Go-Excelize API源码阅读(一)——NewFile()
Gee (6): set the number of decimal places reserved for the calculated value / image