Background process

Doug Barton dougb at FreeBSD.org
Fri Mar 9 00:14:26 UTC 2007


sthomas at nerim.net wrote:
> Hello,
> 
> I connect to my freebsd box via ssh using putty from a WindowsXP
> workstation, I want to run a process on the freebsd box, then close my ssh
> session (closing putty) while keeping the process running.
> 
> So I run my process like this : # myprogram &, then I exit the shell.

screen is serious overkill in this scenario, although it's advocates 
tend to see it as the solution for every problem. :)

No one has offered what I think is the most sensible option, which is 
to check the documentation for your program to see if it has a command 
line option to background itself properly. I'm not familiar with 
moinmoin, but I have a hard time believing that it doesn't have this 
capability.

Failing that, if you need to preserve anything that is emitted from 
the program, nohup is probably your best bet. If it isn't going to 
spit anything out on the terminal, take a look at daemon(8), which you 
probably will want to run with the -f option.

Good luck,

Doug

-- 

     This .signature sanitized for your protection



More information about the freebsd-stable mailing list