Difference between revisions of "Fg"

From NetHackWiki
Jump to navigation Jump to search
m (Fix typo)
m (Added mnemonic)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{DISPLAYTITLE:fg}}
 
{{man|fg}}
 
{{man|fg}}
  
'''fg''' is a generic Linux/Unix utility, that resumes execution of a suspended process.
+
'''fg''' (mnemonic: "'''f'''ore'''g'''round") is a generic Linux/Unix utility that resumes execution of a suspended process.
  
Sometimes, unwary users press "ctrl-Z" by accident. This suspends the game and puts it in the backgroud. With the message:
+
Sometimes, unwary users press {{kbd|Ctrl|Z}} by accident. This suspends the game and puts it in the background, giving a message similar to:
  
"[1]+ Stopped nethack"
+
"[1]+ Stopped       nethack"
  
 
Attempting to restart the game by rerunning "nethack" will give the message:
 
Attempting to restart the game by rerunning "nethack" will give the message:
Line 11: Line 12:
 
"There is already a game in progress under your name. Destroy old game? [yn]"
 
"There is already a game in progress under your name. Destroy old game? [yn]"
  
Say no to the above. You just need to run the command "fg" in the original terminal to resume the frozen game.  
+
Say "no" to the above; you need to run the command "fg" in the original terminal to resume the frozen game.  
  
If you have already killed the original terminal, then try killing nethack with "killall nethack". Then you might need to actually use the [[recover]] utility.
+
If you have already killed the original terminal, then try killing nethack with "killall nethack"; then you might need to use the [[recover]] utility.
 +
 
 +
[[Category:Development]]

Latest revision as of 19:25, 11 March 2023

fg (mnemonic: "foreground") is a generic Linux/Unix utility that resumes execution of a suspended process.

Sometimes, unwary users press Ctrl + Z by accident. This suspends the game and puts it in the background, giving a message similar to:

"[1]+ Stopped        nethack"

Attempting to restart the game by rerunning "nethack" will give the message:

"There is already a game in progress under your name. Destroy old game? [yn]"

Say "no" to the above; you need to run the command "fg" in the original terminal to resume the frozen game.

If you have already killed the original terminal, then try killing nethack with "killall nethack"; then you might need to use the recover utility.