diff lisp/prim/console.el @ 108:360340f9fd5f r20-1b6

Import from CVS: tag r20-1b6
author cvs
date Mon, 13 Aug 2007 09:18:39 +0200
parents 131b0175ea99
children 538048ae2ab8
line wrap: on
line diff
--- a/lisp/prim/console.el	Mon Aug 13 09:17:27 2007 +0200
+++ b/lisp/prim/console.el	Mon Aug 13 09:18:39 2007 +0200
@@ -30,3 +30,12 @@
 that the information is returned for; nil means the current console."
   (nth 3 (current-input-mode console)))
 
+(defun resume-pid-console (pid)
+  "Resume the consoles with a controlling process of PID."
+  (mapc (lambda (c) 
+	  (if (and (eq (console-type c) 'tty)
+		   (= pid (console-tty-controlling-process c)))
+	      (resume-console c)))
+	(console-list))
+  ; documentation for mapc lies!
+  nil)