zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Re: BUG: jobs -d causes core dump
@ 2000-05-05  7:17 Sven Wischnowsky
  0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 2000-05-05  7:17 UTC (permalink / raw)
  To: zsh-workers


Felix Rosencrantz wrote:

> When I attempt to run "jobs -l -d" I get a core dump, with the following
> stack trace.
> 
> I think the problem occurs when there is a job in the background that was
> started in the current directory.  It seems like the pathname in the Job
> structure is a NULL pointer at that time.  

Right. Saves us lots of unnecessary dups or copies.

Bye
 Sven

Index: Src/jobs.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/jobs.c,v
retrieving revision 1.2
diff -u -r1.2 jobs.c
--- Src/jobs.c	2000/04/01 20:49:48	1.2
+++ Src/jobs.c	2000/05/05 07:17:13
@@ -734,7 +734,7 @@
     if ((lng & 4) || (interact && job == thisjob &&
 		      jn->pwd && strcmp(jn->pwd, pwd))) {
 	fprintf(shout, "(pwd %s: ", (lng & 4) ? "" : "now");
-	fprintdir((lng & 4) ? jn->pwd : pwd, shout);
+	fprintdir(((lng & 4) && jn->pwd) ? jn->pwd : pwd, shout);
 	fprintf(shout, ")\n");
 	fflush(shout);
     }

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-05-05  7:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-05  7:17 PATCH: Re: BUG: jobs -d causes core dump Sven Wischnowsky

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).