In message: <[EMAIL PROTECTED]>
            Garance A Drosihn <[EMAIL PROTECTED]> writes:
: realclean :
:       rm -Rf ${.OBJDIR}/*

I'd make that be more like:

realclean :
        @chflags -R 0 ${.OBJDIR}/*
        @rm -Rf ${.OBJDIR}/*

since sometimes you wind up files that have flags set on them.  I once
looked into hacking rm to do that in one step, but couldn't figure out
a way to do it race free and punted.  There was no notion of a
funlink.  this is conceptually as close as I got:

         fd = open(path, O_RDRW);       /*1*/
         fchflags(fd, 0);
         unlink(path);                  /*2*/

which races between /*1*/ and /*2*/.

If you can tolerate errors in the output, the following is faster
because the chflags has lots less work to do:

realclean :
        @rm -Rf ${.OBJDIR}/*
        @chflags -R 0 ${.OBJDIR}/*
        @rm -Rf ${.OBJDIR}/*


Warner
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to