• 请不要在回答技术问题时复制粘贴 AI 生成的内容
BellaCampen
V2EX  ›  程序员

有没有办法让正在运行的程序在当前会话断开后能够暂停或者后台继续运行呢

  •  
  •   BellaCampen · Oct 5, 2023 · 1872 views
    This topic created in 959 days ago, the information mentioned may be changed or developed.
    bg fg 可以暂停恢复会话,不过当前 ssh 断开后就无法恢复了

    screeen 可以断开后也能继续运行会话,不过需要实现新建会话

    有没有办法实现让正在运行的程序在当前会话断开后能够暂停或者后台继续运行呢

    求教大佬
    9 replies    2023-10-05 23:45:17 +08:00
    SenLief
        1
    SenLief  
       Oct 5, 2023
    nohup
    tap91624
        3
    tap91624  
       Oct 5, 2023
    tmux
    getadoggie
        4
    getadoggie  
       Oct 5, 2023 via iPhone
    byobu 不知道满不满足你说的
    raycool
        5
    raycool  
       Oct 5, 2023
    tmux 吧
    hijoker
        6
    hijoker  
       Oct 5, 2023
    ctrl+z
    rebecca554owen
        7
    rebecca554owen  
       Oct 5, 2023 via Android
    进程守护
    justthewayyouare
        8
    justthewayyouare  
       Oct 5, 2023 via iPhone
    Docker
    flynaj
        9
    flynaj  
       Oct 5, 2023 via Android
    写成服务,无论 Linux ,还是 Windows 都是可以的。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5177 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 304ms · UTC 09:08 · PVG 17:08 · LAX 02:08 · JFK 05:08
    ♥ Do have faith in what you're doing.