Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-07-2006, 05:07 PM   #1
mrthumbs
salad tossing sig guy
 
mrthumbs's Avatar
 
Join Date: Apr 2002
Location: mrthumbs*gmail.com
Posts: 11,702
simple unix (freebsd) question..

Im logged in as root with SSH.. i want to start a program or script to run in the background so that when i kill my SSH session it keeps running...

Shouldnt be a cronjob.. just something that doesnt terminate when i terminate my session....
mrthumbs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-07-2006, 05:09 PM   #2
mrthumbs
salad tossing sig guy
 
mrthumbs's Avatar
 
Join Date: Apr 2002
Location: mrthumbs*gmail.com
Posts: 11,702
Hmm am i correct that ./command &

does the job?
mrthumbs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-07-2006, 05:09 PM   #3
HorseShit
Too lazy to set a custom title
 
Join Date: Dec 2004
Posts: 17,513
You want to run it in screen

example

screen <program-name>

if you don't have screen installed you will have to install it
HorseShit is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-07-2006, 07:25 PM   #4
prime
Confirmed User
 
Join Date: Feb 2005
Location: Manila
Posts: 400
I use screen for that trick, get it installed and start rolling
__________________

| offshore solutions | manual labor | staff leasing | and more!
Dedicated -Motivated-Managed Employees
icq.: 309570461 live chat
prime is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-07-2006, 07:28 PM   #5
com
Confirmed User
 
Join Date: Aug 2003
Location: Portland, Oregon
Posts: 4,541
Quote:
Originally Posted by prime
I use screen for that trick, get it installed and start rolling
ditto ....
__________________

Real. Professional. Hosting.
.:Expect Nothing Less:.
320-078-843 :: www.realprohosting.com :: [email protected]
com is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-07-2006, 07:42 PM   #6
toddler
Confirmed User
 
Join Date: Jun 2002
Location: austin, tx
Posts: 1,911
Screen is the way to go. Easy as sin

screen some_cmd

to detach from the screen, hit ctrl a then ctrl d

to reattach to a screen

screen -r


you can have many screens going, you can screen shells, makes, etc etc.
toddler is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-07-2006, 07:47 PM   #7
skinnay
Confirmed User
 
Join Date: Apr 2004
Location: NEW YORK CITY
Posts: 2,274
nohup script &
skinnay is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-07-2006, 07:47 PM   #8
pstation
Confirmed User
 
Join Date: Jul 2003
Location: chicago
Posts: 1,135
nohup <command_goes_here> & works too

nohup basicly causes the script to ingore all hangup signals, screen works awesome too as well but it's generally overkill for non-interactive scripts.
pstation is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.