From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3320 invoked from network); 5 May 2000 07:17:44 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 May 2000 07:17:44 -0000 Received: (qmail 12626 invoked by alias); 5 May 2000 07:17:36 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11170 Received: (qmail 12605 invoked from network); 5 May 2000 07:17:35 -0000 Date: Fri, 5 May 2000 09:17:32 +0200 (MET DST) Message-Id: <200005050717.JAA21361@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Felix Rosencrantz's message of Thu, 4 May 2000 22:16:45 -0700 (PDT) Subject: PATCH: Re: BUG: jobs -d causes core dump 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