mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-29 22:40:34 +02:00
Do not warn the user when 'madvise' returns ENOSYS.
* libguile/vm.c (return_unused_stack_to_os): Avoid 'perror' calls when 'madvise' returns ENOSYS.
This commit is contained in:
parent
901bfef592
commit
45e4ace660
1 changed files with 5 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2001, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2018 Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
|
@ -904,7 +904,10 @@ return_unused_stack_to_os (struct scm_vm *vp)
|
|||
ret = madvise ((void *) lo, hi - lo, MADV_DONTNEED);
|
||||
while (ret && errno == EAGAIN);
|
||||
|
||||
if (ret)
|
||||
/* If the OS doesn't implement 'madvise' (as is currently the case
|
||||
for GNU/Hurd), don't warn the user since there's nothing they
|
||||
can do about it. */
|
||||
if (ret && errno != ENOSYS)
|
||||
perror ("madvise failed");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue