dune
dune copied to clipboard
fix(haiku): execve not allowed if other pthreads have already been created
Compiling for Haiku
@rgrinberg do you think this needs a changelog entry?
I think it would be worth a changelog entry. I'm still unsure about the issue this is resolving since I've never seen it, so I wouldn't mind a link to some Haiku documentation explaining the issue here. I also don't have a Haiku VM avilable at the moment, so if somebody could double check they can build and run dune on Haiku that would be great.
I don't see why not. If this change is useful to anyone using Haiku, the change log entry would also be useful
I think it would be worth a changelog entry. I'm still unsure about the issue this is resolving since I've never seen it, so I wouldn't mind a link to some Haiku documentation explaining the issue here. I also don't have a Haiku VM avilable at the moment, so if somebody could double check they can build and run
duneon Haiku that would be great.
@Alizter I encounter this when compiling lwt : "dune exec..." leads to "Operation not supported" because of this line kernel/team.cpp#1981.
The fact that haiku can't call execve from other threads than the principal thread of a process (a team in haiku jargon), is a discrepancy to POSIX and hence there is a bug about it : https://dev.haiku-os.org/ticket/18665.
@Sylvain78 Thank you for the context. I recall now seeing something similar to do this when I had a look at Haiku support before. What the Haiku designers will do upstream shouldn't be something we rely on obviously, so the fix that you've given here seems sensible and rigid.
Please add a changelog entry together with links to the Haiku issue and this should be good to go.