summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-06-12 18:44:12 +0200
committerhut <hut@lavabit.com>2009-06-12 18:44:12 +0200
commit1a5cafd79d8e0499b7e5c044fdc3211e234f5b04 (patch)
tree3ddbda5b0ebed23d7d63e30f592b4c8443c0cb6d
parentd52cc245e910784daf7b5a9581ac81f40ff404c2 (diff)
downloadranger-1a5cafd79d8e0499b7e5c044fdc3211e234f5b04.tar.gz
fixed evil bug *completely*
the one that keeps ranger running in the background when you use the
window manager to close it (ie. clicking the X or pressing ALT+F4
or whatever means your window manager has to close a program)
-rw-r--r--code/fm/fm.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/code/fm/fm.rb b/code/fm/fm.rb
index a6054052..1bf74081 100644
--- a/code/fm/fm.rb
+++ b/code/fm/fm.rb
@@ -117,6 +117,7 @@ module Fm
 	def main_loop
 		bool = false
 		while true
+			exit if Process.ppid == 1
 			if @pwd.size == 0 or @pwd.pos < 0
 				@pwd.pos = 0
 			elsif @pwd.pos >= @pwd.size - 1