home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.admin:4832 comp.unix.questions:10633 comp.unix.shell:3754
- Newsgroups: comp.unix.admin,comp.unix.questions,comp.unix.shell
- Path: sparky!uunet!uunet.ca!wildcan!sq!msb
- From: msb@sq.sq.com (Mark Brader)
- Subject: Re: How to prevent a large core-dump
- Message-ID: <1992Sep2.050208.9673@sq.sq.com>
- Organization: SoftQuad Inc., Toronto, Canada
- References: <1992Aug25.173056.13401@utwente.nl> <1992Sep1.150813.1695@impmh.uucp>
- Date: Wed, 2 Sep 92 05:02:08 GMT
- Lines: 19
-
- > echo > core
- > chmod 0 core
- > Then the program will not produce a core, since the file "core" already
- > exists, but is unwritable (see signal(2)).
-
- Fine for most purposes, probably including the original query, but wait
- until the day that it's a setuid-root program whose core dumps you want
- to prevent! On the versions of UNIX that I'm familiar with, that method
- won't stop them at all. But this will:
-
- mkdir core
-
- Even root can't create a file with the same name as an existing directory.
- --
- Mark Brader "Ken doesn't spell very well.
- SoftQuad Inc., Toronto Fortunately, he has other virtues."
- utzoo!sq!msb, msb@sq.com -- Dennis Ritchie
-
- This article is in the public domain.
-