home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / admin / 4731 < prev    next >
Encoding:
Text File  |  1992-08-29  |  988 b   |  30 lines

  1. Xref: sparky comp.unix.admin:4731 comp.unix.questions:10464 comp.unix.shell:3680
  2. Path: sparky!uunet!comp.vuw.ac.nz!waikato.ac.nz!aukuni.ac.nz!ecmtwhk
  3. Newsgroups: comp.unix.admin,comp.unix.questions,comp.unix.shell
  4. Subject: Re: How to prevent a large core-dump
  5. Message-ID: <1992Aug28.095120.25797@ccu1.aukuni.ac.nz>
  6. From: ecmtwhk@ccu1.aukuni.ac.nz (Thomas Koenig)
  7. Date: Fri, 28 Aug 1992 09:51:20 GMT
  8. References: <1992Aug25.173056.13401@utwente.nl>
  9. Organization: University of Auckland, New Zealand.
  10. Lines: 18
  11.  
  12. soos@math.utwente.nl (Adwin Soos) wants
  13.  
  14. >some suggestions on how
  15. >to prevent that a large core-dump will be made. 
  16.  
  17. #include <sys/resource.h>
  18. [...]
  19.     struct rlimit rlp;
  20.  
  21.     getrlimit(RLIMIT_CORE,&rlp);
  22.     rlp.rlim_cur = 0;
  23.     setrlimit (RLIMIT_CORE,&rlp);
  24.  
  25. limits the size of the core to 0 bytes (at least on an SGI running IRIX).
  26. -- 
  27. Thomas Koenig, ecmtwhk@ccu1.aukuni.ac.nz, ib09@rz.uni-karlsruhe.de
  28. The joy of engineering is to find a straight line on a double logarithmic
  29. diagram.
  30.