FedoraForum.org - Fedora Support Forums and Community
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2009
    Posts
    2,138

    What's The Difference Between Exit and Closing A Terminal Graphically?

    If I start a process in the background in a terminal window with &, then type exit, the process keeps running. If I start one in background, then close the terminal with the X (close) button, the background process terminates. Is that expected, and if so, what other differences are there between the two methods of closing a terminal window?

    dd_wizard

  2. #2
    Join Date
    Dec 2009
    Location
    Centennial, Colorado USA
    Posts
    128
    Try "nohup command &" where command is what you want to run. I don't know if this will work. The nohup command has been around since the '70's. See "man nohup".

  3. #3
    Join Date
    Sep 2009
    Posts
    2,138
    Ah, so closing the window instead of typing exit sends SIGHUP. Makes sense.

    dd_wizard

  4. #4
    Join Date
    Dec 2009
    Location
    Centennial, Colorado USA
    Posts
    128
    Are "exit" and "cntl-D" entered in a window the same?

    "cntl-D" was a logout and closes the window.

  5. #5
    Join Date
    Sep 2009
    Posts
    2,138
    Ctrl-D doesn't send SIGHUP to background processes, and from the Advanced Bash-Scripting Guide:
    Ctl-D
    Log out from a shell (similar to exit).
    EOF (end-of-file). This also terminates input from stdin.
    When typing text on the console or in an xterm window, Ctl-D erases the character under
    the cursor. When there are no characters present, Ctl-D logs out of the session, as expected.
    In an xterm window, this has the effect of closing the window.
    However, closing the window isn't quite the same as Ctl-D or exit, since that sends SIGHUP to background processes. It makes sense that closing the window would be like losing your serial connection back in the day.

    dd_wizard

Similar Threads

  1. Dialog box opens when closing gnome-terminal
    By terry_g in forum Using Fedora
    Replies: 6
    Last Post: 4th December 2009, 03:29 PM
  2. Closing a PDF document from the terminal
    By OOpingOO in forum Using Fedora
    Replies: 1
    Last Post: 3rd May 2009, 08:36 PM
  3. gnome-terminal unresponsive after exit command
    By Deb in forum Using Fedora
    Replies: 5
    Last Post: 9th March 2009, 01:45 AM
  4. Process still running after closing terminal
    By CKG in forum Using Fedora
    Replies: 1
    Last Post: 10th December 2008, 03:04 PM
  5. Exit to terminal
    By rolo550 in forum Using Fedora
    Replies: 6
    Last Post: 21st February 2008, 02:01 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •