chicken-hackers
[Top][All Lists]
Advanced

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

[Chicken-hackers] [PATCH] Fix #765 and a small can of worms related to e


From: Peter Bex
Subject: [Chicken-hackers] [PATCH] Fix #765 and a small can of worms related to error handling under Windows
Date: Fri, 22 Nov 2013 21:43:31 +0100
User-agent: Mutt/1.4.2.3i

Hi all,

See the attached patch, it kind of speaks for itself.

I don't know why, but looks like Win7 doesn't allow cloning
a handle from the current process and then setting its access
to INHERIT.  I guess this is a security measure, but it should
be just fine if we clone it and keep the current permissions
because if *we* aren't allowed to inherit it, there's nothing we
can do about it anyway to make it inheritable for the child.

The error handling in Windows was completely broken; the errmap
loop updated map, but looked at errmap.  I've made it a little more
idiomatic, so it's "obviously correct".  So far the errno isn't
really used anywhere.  It looks like this exists only because errno
is foolishly exposed to the user via the posix-error and errno
procedures, and for that to sort-of work (it doesn't), this strange
conversion is being done.  Reworking that will be like opening a
whole other can of worms, so I kept it closed for the time being,
at least until 4.9.0 is released.

I think this patch should go into the stability branch.

Cheers,
Peter
-- 
http://www.more-magic.net

Attachment: 0001-Fix-process-under-Windows-and-fix-general-error-hand.patch
Description: Text document


reply via email to

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