Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
more useful options
 
PerlMonks  

re-attaching?

by Punto (Scribe)
on Oct 29, 2001 at 03:04 UTC ( [id://121871]=perlquestion: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.

Punto has asked for the wisdom of the Perl Monks concerning the following question:

Hi.

I saw a lot of nodes about running a program on the background, but is there any way to 're-attach' the program that's on the background, to use it on the terminal again? (like the /detach command on BitchX)

I'm looking at the bitchx code, but it's too ugly, and I want to use it for a perl script. I see something about fork(), an ipc socket, and a 'screen type program', but I'm missing something.

thanks..

Replies are listed 'Best First'.
Not really a perl question . . .
by Fletch (Bishop) on Oct 29, 2001 at 05:10 UTC

    Check if screen is installed on your system. It's a program that lets you talk to multiple programs running on different ptys and switch back and forth between them. It will also allow you to detatch from the session and then reattach later and get back in touch with what you left running. See http://www.gnu.org/software/screen/ for more details.

    You could do something similar in perl, but a) you'd be reinventing a wheel that already works fine, and b) it involves some deep UNIX mojo to do correctly.

Re: re-attaching?
by arabella (Acolyte) on Oct 30, 2001 at 02:34 UTC
    If you're using *nix you should look at the "fg" command. This is an internal command provided by most shells.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://121871]
Approved by root
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.