Re: Background process
> On Thu, Mar 08, 2007 at 04:14:22PM -0800, Doug Barton wrote: > I've run moinmoin: it's a cgi script (wiki). It gets called > from a web server, usually Apache. There's no call to be > running it from the command line at all, that I'm aware of. I run moinmoin in "standalone" mode, so it has its own http server. Thanks to everybody for their answer, I installed and used screen now it works ok for me. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Background process
On Thu, Mar 08, 2007 at 04:14:22PM -0800, Doug Barton wrote: > 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. I've run moinmoin: it's a cgi script (wiki). It gets called from a web server, usually Apache. There's no call to be running it from the command line at all, that I'm aware of. Could be it isn't installed or configured properly. The config script is installed by the port, and it's pretty nicely commented. Cheers, -- Andrew ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Background process
On Mar 8, 2007, at 7:14 PM, Doug Barton wrote: 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. I can't remember needing nohup to run *anything* since the ancient days of the old old old /bin/sh which would kill all of your processes upon logout. Modern shells do not do this. Just redirect the stdin/stdout/stderr appropriately and run in bg. The more appropriate tool, assuming the original program has no "run as daemon" flag is the daemon(8) program as mentioned above.
Re: Background process
[EMAIL PROTECTED] 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 ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Background process
On Thu, Mar 08, 2007 at 09:59:16AM -0600, [EMAIL PROTECTED] wrote: > Quoting [EMAIL PROTECTED]: > > >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. > > > > nohup ? > > ed > There is always the screen program /usr/ports/sysutils/screen which is ideal for things like this. Although it's not a builtin like nohup, it is (imho) more flexible. (To be honest, I've used screen for so long, if I had to use nohup I'd have to look up the syntax) I think it's something like nohup sh -c $(your_command) & but I could be wrong. -- Scott GPG KeyID EB3467D6 ( 1B848 077D 66F6 9DB0 FDC2 A409 FA54 D575 EB34 67D6) gpg --keyserver pgp.mit.edu --recv-keys EB3467D6 Giles: But this is why I think we should all keep a level head in this. Willow: And I happen to think mine is the level head and yours is the one things would roll off of. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Background process
Hi, [EMAIL PROTECTED] 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. But when I do that, I can see with ps that my process go from "TT" "p0" to "TT" "p0-" and the application doesn't work anymore. For information, the program I want to be able to run via ssh then close the ssh session is the moinmoin wiki which is a wiki written in python. In man ps I can see that the trailing "-" after "p0" means my process can no longer reach the controlling terminal... But what can I do to achieve my goal ? Did you try "disown" before closing ssh ? Anyway if you want to be able to restore (on foreground) your application then you need screen from ports. But if you just want to start something as daemon this work for me: ./app ^Z bg disown exit :) ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]" -- Best Wishes, Stefan Lambrev ICQ# 24134177 ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Background process
Quoting [EMAIL PROTECTED]: 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. nohup ? ed But when I do that, I can see with ps that my process go from "TT" "p0" to "TT" "p0-" and the application doesn't work anymore. For information, the program I want to be able to run via ssh then close the ssh session is the moinmoin wiki which is a wiki written in python. In man ps I can see that the trailing "-" after "p0" means my process can no longer reach the controlling terminal... But what can I do to achieve my goal ? ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Background process
Look into sysutils/screen There are several tutorial on how to use it. On 3/8/07, Jeremy Chadwick <[EMAIL PROTECTED]> wrote: On Thu, Mar 08, 2007 at 02:03:24PM +0100, [EMAIL PROTECTED] 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. > > But when I do that, I can see with ps that my process go from "TT" "p0" to > "TT" "p0-" and the application doesn't work anymore. For information, the > program I want to be able to run via ssh then close the ssh session is the > moinmoin wiki which is a wiki written in python. > > In man ps I can see that the trailing "-" after "p0" means my process can > no longer reach the controlling terminal... But what can I do to achieve > my goal ? The program you're using obviously needs a tty/pty open for it to function. Possibly it's trying to output to stdout or stderr and cannot due to tty/pty being taken out underneathe it. Other *IX people here can give you some alternate advice, but I'd recommend these options: 1) Under sh/bash: myprogram 1>/dev/null 2>&1 & (or replace /dev/null with a logfile of your choice) 2) Use dtach (ports/misc/dtach) and detach your program. http://dtach.sourceforge.net/ 3) Use GNU screen (ports/sysutils/screen) and run your program within that. http://www.gnu.org/software/screen/ -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networkinghttp://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]" -- Attos Janus ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Background process
On Thu, Mar 08, 2007 at 02:03:24PM +0100, [EMAIL PROTECTED] 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. > > But when I do that, I can see with ps that my process go from "TT" "p0" to > "TT" "p0-" and the application doesn't work anymore. For information, the > program I want to be able to run via ssh then close the ssh session is the > moinmoin wiki which is a wiki written in python. > > In man ps I can see that the trailing "-" after "p0" means my process can > no longer reach the controlling terminal... But what can I do to achieve > my goal ? Install ports/sysutils/screen. -- WXS ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Background process
On Thu, Mar 08, 2007 at 02:03:24PM +0100, [EMAIL PROTECTED] 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. > > But when I do that, I can see with ps that my process go from "TT" "p0" to > "TT" "p0-" and the application doesn't work anymore. For information, the > program I want to be able to run via ssh then close the ssh session is the > moinmoin wiki which is a wiki written in python. > > In man ps I can see that the trailing "-" after "p0" means my process can > no longer reach the controlling terminal... But what can I do to achieve > my goal ? The program you're using obviously needs a tty/pty open for it to function. Possibly it's trying to output to stdout or stderr and cannot due to tty/pty being taken out underneathe it. Other *IX people here can give you some alternate advice, but I'd recommend these options: 1) Under sh/bash: myprogram 1>/dev/null 2>&1 & (or replace /dev/null with a logfile of your choice) 2) Use dtach (ports/misc/dtach) and detach your program. http://dtach.sourceforge.net/ 3) Use GNU screen (ports/sysutils/screen) and run your program within that. http://www.gnu.org/software/screen/ -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networkinghttp://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Background process
On Thu, Mar 08, 2007 at 02:03:24PM +0100, [EMAIL PROTECTED] 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. > > But when I do that, I can see with ps that my process go from "TT" "p0" to > "TT" "p0-" and the application doesn't work anymore. For information, the > program I want to be able to run via ssh then close the ssh session is the > moinmoin wiki which is a wiki written in python. > > In man ps I can see that the trailing "-" after "p0" means my process can > no longer reach the controlling terminal... But what can I do to achieve > my goal ? I believe what you are looking for is nohup(1). -- Brooks pgpHT3NtMm88J.pgp Description: PGP signature
Background process
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. But when I do that, I can see with ps that my process go from "TT" "p0" to "TT" "p0-" and the application doesn't work anymore. For information, the program I want to be able to run via ssh then close the ssh session is the moinmoin wiki which is a wiki written in python. In man ps I can see that the trailing "-" after "p0" means my process can no longer reach the controlling terminal... But what can I do to achieve my goal ? ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"