1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-21 04:00:19 +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:
Ludovic Courtès 2018-12-15 18:04:27 +01:00 committed by Andy Wingo
parent 1b0fcddba5
commit abeeec74b2

View file

@ -660,7 +660,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");
}