summary refs log tree commit diff
path: root/Src/jobs.c
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-05-29 09:49:58 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-05-29 09:49:58 +0000
commit1bb5d5aeb5565215aa3359874d7701045926b1b7 (patch)
tree8153e7d43f8f99907d3f5d4f8c699e8a2ca045d0 /Src/jobs.c
parentc58a4e7e28504c4d4cca8ecabc3ea92225fee29b (diff)
downloadzsh-1bb5d5aeb5565215aa3359874d7701045926b1b7.tar.gz
zsh-1bb5d5aeb5565215aa3359874d7701045926b1b7.tar.xz
zsh-1bb5d5aeb5565215aa3359874d7701045926b1b7.zip
print at least a warning when disowning a stopped job (14524)
Diffstat (limited to 'Src/jobs.c')
-rw-r--r--Src/jobs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Src/jobs.c b/Src/jobs.c
index bfc95ab61..82e4926ff 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -1392,6 +1392,14 @@ bin_fg(char *name, char **argv, char *ops, int func)
 	    printjob(job + jobtab, lng, 2);
 	    break;
 	case BIN_DISOWN:
+	    if (jobtab[job].stat & STAT_STOPPED)
+                zwarnnam(name,
+#ifdef USE_SUSPENDED
+                         "warning: job is suspended",
+#else
+                         "warning: job is stopped",
+#endif
+                         NULL, 0);
 	    deletejob(jobtab + job);
 	    break;
 	}