*BSD News Article 12677


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!spool.mu.edu!uunet!not-for-mail
From: sef@Kithrup.COM (Sean Eric Fagan)
Newsgroups: comp.os.386bsd.bugs
Subject: Re: Bug in 386bsd 0.2 (patches up to 110)
Date: 15 Mar 1993 15:14:21 -0800
Organization: Kithrup Enterprises, Ltd.
Lines: 18
Sender: sef@ftp.UU.NET
Message-ID: <1o32kdINNide@ftp.UU.NET>
References: <1o30cgINN87l@jhunix.hcf.jhu.edu> <1o3111INNhiv@ftp.UU.NET> <1o31jaINNapm@jhunix.hcf.jhu.edu>
NNTP-Posting-Host: ftp.uu.net

In article <1o31jaINNapm@jhunix.hcf.jhu.edu> philippe@jhunix.hcf.jhu.edu (Philippe Pouliquen) writes:
>Only thing I can think of is that I was root (running csh).
>The error you got is what is supposed to happen.

And so it was.  I tested it, and found the problem.  In
/usr/src/usr.bin/ld/ld.c, around line 3124, it does:

	(void)unlink (output_filename);

I think you can just delete that, or you can change it to do:

  if (stat (output_filename, &statbuf) != -1) {
    if (S_ISREG(statbuf.st_mode))
        (void) unlink (output_filename);
  }

(I've just done the latter.)  Just tested it, and I get an error.