home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / admin / 4832 < prev    next >
Encoding:
Internet Message Format  |  1992-09-01  |  1.1 KB

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