[Python] PowerShell equivalent of Linux `nohup command &` - Run processes that survive...

Discussão em 'Python' iniciado por Stack, Julho 1, 2025.

  1. Stack

    Stack Membro Participativo

    I need to run Python programs that continue running even after I close the PowerShell terminal window. In Linux bash, I use:

    nohup python my_program.py &


    This runs the program in the background and it survives terminal closure.

    What is the PowerShell equivalent of nohup command &?

    What I've tried:

    • Running python my_program.py directly - process dies when terminal closes
    • Using Start-Process without parameters - still terminates with terminal
    Requirements:

    • Process must survive PowerShell terminal closure
    • Should run in background (no visible window)
    • My Python program spawns subprocesses that should also survive

    Continue reading...

Compartilhe esta Página