1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 22:11:54 +02:00

make warning message for disowning stopped jobs more verbose (saying how to make the job running again) (15087)

This commit is contained in:
Sven Wischnowsky 2001-06-26 08:18:22 +00:00
parent b397a5187a
commit 2ca99605ed
2 changed files with 31 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2001-06-26 Sven Wischnowsky <wischnow@zsh.org>
* 15087: Src/jobs.c: make warning message for disowning stopped
jobs more verbose (saying how to make the job running again)
2001-06-25 Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
* zsh-users/3942: source installed as Etc/FAQ.yo: latest FAQ.

View file

@ -1392,14 +1392,36 @@ 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)
if (jobtab[job].stat & STAT_STOPPED) {
char buf[20], *pids = "";
if (jobtab[job].stat & STAT_SUPERJOB) {
Process pn;
for (pn = jobtab[jobtab[job].other].procs; pn; pn = pn->next) {
sprintf(buf, " -%d", pn->pid);
pids = dyncat(pids, buf);
}
for (pn = jobtab[job].procs; pn->next; pn = pn->next) {
sprintf(buf, " %d", pn->pid);
pids = dyncat(pids, buf);
}
if (!jobtab[jobtab[job].other].procs && pn) {
sprintf(buf, " %d", pn->pid);
pids = dyncat(pids, buf);
}
} else {
sprintf(buf, " -%d", jobtab[job].gleader);
pids = buf;
}
zwarnnam(name,
#ifdef USE_SUSPENDED
"warning: job is suspended",
"warning: job is suspended, use `kill -CONT%s' to resume",
#else
"warning: job is stopped",
"warning: job is stopped, use `kill -CONT%s' to resume",
#endif
NULL, 0);
pids, 0);
}
deletejob(jobtab + job);
break;
}