Benches macOS

5

Accidentally closed a Terminal window

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

Is there any way to recover the window if the process is still running?

5 replies

Sign in or join Beachball Help to reply.

  1. 0

    Bill Scott

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    If you mean after the fact, no.

    You can use the program "screen" to run a session, disconnect, and reconnect later.

    man screen

    for more info.

  2. 0

    Nils C. Anderson

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    if you decided to go with the screen command, you may want to set up a

    ~/.screenrc file. You can work out you own. Or use the one at

    http://www.softpanorama.org/Utilities/Screen/screenrc_examples.shtml

  3. 0

    Nils C. Anderson

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I just stumbled across this tutorial.

    [LJDT: Taking Advantage of Screen|http://www.novell.com/communities/node/8560/ljdt-taking-advantage-screen ]

  4. 0

    Camelot

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    In most cases, when you close a window, any process running in that window (or, more technically, the shell) will terminate.

    That's not always the case, but you usually have to go to extra lengths to make a process persist beyond the current shell session.

    So the chances are that the process is no longer running anyway.

    AFAIK, the
    screen suggestions will only work for a process that was launched via
    screen. You cannot attach to an arbitrary process.

  5. 0

    rabbitdog

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Thanks, all. I just pressed cmd-w at Terminal when I shouldn't have, then I noticed the process was still running for awhile on the machine I was connected to. It was a ./configure which took time to complete, and likely terminated safely.