Next: , Previous: , Up: Miscellaneous commands   [Contents][Index]


20.11 Zombie

Command: zombie [keys [onerror] ]
Command: zombie_timeout [seconds]

(none)
Per default windows are removed from the window list as soon as the windows process (e.g. shell) exits. When a string of two keys is specified to the zombie command, ‘dead’ windows will remain in the list. The kill command may be used to remove the window. Pressing the first key in the dead window has the same effect. Pressing the second key, however, screen will attempt to resurrect the window. The process that was initially running in the window will be launched again. Calling zombie without parameters will clear the zombie setting, thus making windows disappear when the process terminates.

As the zombie setting is affected globally for all windows, this command should probably be called defzombie, but it isn’t.

Optionally you can put the word onerror after the keys. This will cause screen to monitor exit status of the process running in the window. If it exits normally (’0’), the window disappears. Any other exit value causes the window to become a zombie.

Additionally the zombie_timeout command exists. If a window is declared “dead”, screen will automatically try to resurrect the window after the timeout. It only works if zombie keys are defined via zombie command.