about summary refs log tree commit diff
path: root/Src/Modules
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2002-06-05 14:57:05 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2002-06-05 14:57:05 +0000
commit5ef61a44b12773eccd5de43acb18118eca09de29 (patch)
treea64021870c673a272fad5cec118ff4fa0c565648 /Src/Modules
parent5d010ca81a11d65fca5029644a349a2cd12f6c3b (diff)
downloadzsh-5ef61a44b12773eccd5de43acb18118eca09de29.tar.gz
zsh-5ef61a44b12773eccd5de43acb18118eca09de29.tar.xz
zsh-5ef61a44b12773eccd5de43acb18118eca09de29.zip
17265: make the jobs command work in subshells
Diffstat (limited to 'Src/Modules')
-rw-r--r--Src/Modules/clone.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/Src/Modules/clone.c b/Src/Modules/clone.c
index 11387fc90..1a41b7448 100644
--- a/Src/Modules/clone.c
+++ b/Src/Modules/clone.c
@@ -53,7 +53,7 @@ bin_clone(char *nam, char **args, char *ops, int func)
     }
     pid = fork();
     if (!pid) {
-	clearjobtab();
+	clearjobtab(0);
 	ppid = getppid();
 	mypid = getpid();
 #ifdef HAVE_SETSID
@@ -61,7 +61,7 @@ bin_clone(char *nam, char **args, char *ops, int func)
 	    zwarnnam(nam, "failed to create new session: %e", NULL, errno);
 #endif
 #ifdef TIOCNOTTY
-	    if (ioctl(SHTTY, TIOCNOTTY))
+	    if (ioctl(SHTTY, TIOCNOTTY, 0))
 		zwarnnam(nam, "%e", NULL, errno);
 	    setpgrp(0L, mypid);
 #endif
@@ -98,18 +98,29 @@ static struct builtin bintab[] = {
 
 /**/
 int
-boot_clone(Module m)
+setup_(Module m)
 {
-    return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
+    return 0;
 }
 
-#ifdef MODULE
+/**/
+int
+boot_(Module m)
+{
+    return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
+}
 
 /**/
 int
-cleanup_clone(Module m)
+cleanup_(Module m)
 {
     deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
     return 0;
 }
-#endif
+
+/**/
+int
+finish_(Module m)
+{
+    return 0;
+}