guile-devel
[Top][All Lists]
Advanced

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

Re: Cygwin port of Guile 2.2


From: Andy Wingo
Subject: Re: Cygwin port of Guile 2.2
Date: Fri, 14 Apr 2017 10:35:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

On Tue 04 Apr 2017 18:45, "Mike Gran" <address@hidden> writes:

> I push a branch that mostly makes Guile 2.2 work on Cygwin.

Neat.  LGTM with some nits, with the exception of the "(throw
'unresolved)" patch -- the corresponding catch is in
test-suite/test-suite/lib.scm:344.

> Cygwin's uselocale is broken and can segrault.  I fell back
> to the standard nl-langinfo.  I understand the issue and may
> push a patch upstream to Cygwin sometime.

That would be great.  Can you add a comment to this effect to the line
where you force the nl_langinfo path?  It would be nice to be able to
remove this in the future.

> Also Cygwin's langinfo is incomplete with regards to LC
> MONETARY.  This also is fixable upstream in Cygwin.

I didn't recall seeing a patch here but if there was, please note this
situation there.

> Cygwin requires stability on both ends of a pipe being used
> for inter-thread communication.  If one tries to read from a
> pipe that is closing on the other end, Cygwin may fault.  I
> worked around this by replacing pipes with a
> producer/consumer pattern of semaphores and mutex-protected
> variables.  A dirty workaround.

This was the part I liked least, as you can imagine :)  Oh well
though.  I think it is fine as it is, if you add a comment as to why
it's there.  Of course if you can find a solution that works with pipes,
that would be ideal!

> Lastly, Cygwin's fork just doesn't play well with Guile's
> new GC and threading model.  Despite a copy of days in the
> guts of it all, I don't understand the specifics of the
> issue.  So, in the branch, I disabled forking altogether,
> and by extension, popen and friends.

I guess the new thing being the finalizer thread?  In theory before the
fork, Guile will stop the finalizer thread.  If that's not working, that
could be it.

Another option would be to disable fork() but only if Guile is built
with threads.  Actually this is probably better -- I bet there are Guile
people that expect to be able to fork on Cygwin and would be OK if their
Guile had no threads.

Please feel free to push to master once there are adequate comments.
Someone will come later and want to enable fork() on Cygwin with threads
and will need to know why it's disabled and what they could do to fix it
:)

Thanks!

Andy



reply via email to

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