Imported from ../bash-3.0.tar.gz.
[platform/upstream/bash.git] / builtins / suspend.def
index 43391c0..d616d77 100644 (file)
@@ -1,7 +1,7 @@
 This file is suspend.def, from which is created suspend.c.
 It implements the builtin "suspend" in Bash.
 
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
 
 This file is part of GNU Bash, the Bourne Again SHell.
 
@@ -42,6 +42,7 @@ $END
 
 #include "../bashtypes.h"
 #include <signal.h>
+#include "../bashintl.h"
 #include "../shell.h"
 #include "../jobs.h"
 #include "common.h"
@@ -89,7 +90,7 @@ suspend_builtin (list)
 
   if (job_control == 0)
     {
-      sh_nojobs ("cannot suspend");
+      sh_nojobs (_("cannot suspend"));
       return (EXECUTION_FAILURE);
     }
 
@@ -99,11 +100,14 @@ suspend_builtin (list)
 
       if (login_shell)
        {
-         builtin_error ("cannot suspend a login shell");
+         builtin_error (_("cannot suspend a login shell"));
          return (EXECUTION_FAILURE);
        }
     }
 
+  /* XXX - should we put ourselves back into the original pgrp now?  If so,
+     call end_job_control() here and do the right thing in suspend_continue
+     (that is, call restart_job_control()). */
   old_cont = (SigHandler *)set_signal_handler (SIGCONT, suspend_continue);
 #if 0
   old_stop = (SigHandler *)set_signal_handler (SIGSTOP, SIG_DFL);