[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18592: FFI should have portable access to ‘errno’

From: Mark H Weaver
Subject: bug#18592: FFI should have portable access to ‘errno’
Date: Thu, 03 Mar 2016 12:36:15 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (gnu/linux)

Nala Ginrut <address@hidden> writes:

> Is there still problem? I'm fine with the patch, and I'm expecting to
> merge it ASAP. Anyway, please don't hesitate to tell me if there's still
> any problem, I'm glad to help to do it better. I really need it.

Sorry for the delay, but I'm having second thoughts about whether this
is the right approach.  Perhaps we should instead make a set of
commitments that certain basic operations like scheme evaluation, heap
allocation, and basic scheme procedures will leave 'errno' unchanged.

At the API level, the idea would be that if you write Scheme code that
makes a reasonable effort to avoid non-trivial operations between the
FFI call and the call to (errno) or (set-errno! <n>), this would be

At an implementation level, it would require us to save and restore
'errno' around C library calls that are made by Guile's runtime system
without the user's knowledge, most notably when running GC (during
allocation) or when running asyncs and things like that.

What do you think?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]