lkml.org 
[lkml]   [1998]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Directory name problem...
On Sun, 25 Oct 1998, Riley Williams wrote:

>Unfortunately, the Linux kernel source tree includes a directory named
>core - check for yourself, it's in directory net under wherever you've
>stored the kernel from - and one side effect of the said script is
>that every time it's run, the said directory and everything in it gets
>wiped...
>
>I've had a word with the said administrator, who insists that the only
>thing that's ever created with the name 'core' is a coredump file,
>despite the obvious absurdity of that claim, so there's obviously no
>relief available from that source. In addition, when thinking about
>it, one soon realises that similar problems are almost bound to occur
>elsewhere for precicely the same reason, probably resulting in lots of
>unnecessary bug reports as well...

Well, the "said" administrator is totally wrong. Not only the
linux kernel, but many other packages have files and directories
named "core". There is absolutely nothing whatsoever stopping
anyone from naming a file "core", and any script which blindly
deletes all files named core is just a ticking time bomb, and is
just plain wrong.

The proper method is to scan for files/dirs named core, and pipe
them through the "file" command to determine if they really are
core files prior to deletion.

From my perspective, the simplest solution would be to rename that
>directory to something else, and then edit the relevant Makefiles to
>use the new name instead - as far as I can see, nothing else would be
>affected - and if that is the case, this change shouldn't have the
>slightest effect on the actual code produced...

No, that is not the simplest solution, as it does not in any way
prevent anyone from creating a legitimate file called "core"
for other purposes that is not a core file. I myself have a file
called core which happens to be the name of an executable program
that has nothing to do with core files whatsoever.

To expect everyone on the planet to just not use "core" as a file
or directory name is just plain not going to happen. The *ONLY*
proper solution to the corefile removal problem is to write a
proper script that removes corefiles and ONLY corefiles properly.

Try: man file

>As far as I can tell, the said directory contains the core networking
>routines, hence its name. If so, reasonably obvious alternative names
>would be any of the following:
>
> base
> general
>
>..or even...
>
> Core <= note the capital C here...

An even more reasonable alternative is to correct the script
which wrongly deletes all core files/dirs with brute force.
Someone is likely to post such a script however...

Take care,
TTYL


--
Mike A. Harris - Computer Consultant - Linux advocate

Linux software galore: http://freshmeat.net


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.116 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site