mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
See ChangeLog: Thu Sep 14 14:20:38 CEST 2000 Werner Koch
This commit is contained in:
parent
8f6b40ff1c
commit
0b9d3e2f81
22 changed files with 1407 additions and 399 deletions
13
g10/misc.c
13
g10/misc.c
|
@ -79,22 +79,23 @@ trap_unaligned(void)
|
|||
#endif
|
||||
|
||||
|
||||
void
|
||||
int
|
||||
disable_core_dumps()
|
||||
{
|
||||
#ifndef HAVE_DOSISH_SYSTEM
|
||||
#ifdef HAVE_DOSISH_SYSTEM
|
||||
return 0;
|
||||
#else
|
||||
#ifdef HAVE_SETRLIMIT
|
||||
struct rlimit limit;
|
||||
|
||||
limit.rlim_cur = 0;
|
||||
limit.rlim_max = 0;
|
||||
if( !setrlimit( RLIMIT_CORE, &limit ) )
|
||||
return;
|
||||
if( errno != EINVAL )
|
||||
return 0;
|
||||
if( errno != EINVAL && errno != ENOSYS )
|
||||
log_fatal(_("can't disable core dumps: %s\n"), strerror(errno) );
|
||||
#endif
|
||||
if( !opt.quiet )
|
||||
log_info(_("WARNING: program may create a core file!\n"));
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue