dune icon indicating copy to clipboard operation
dune copied to clipboard

fix(haiku): execve not allowed if other pthreads have already been created

Open Sylvain78 opened this issue 1 year ago • 5 comments

Compiling for Haiku

Sylvain78 avatar Sep 24 '24 10:09 Sylvain78

@rgrinberg do you think this needs a changelog entry?

anmonteiro avatar Sep 29 '24 20:09 anmonteiro

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.

Alizter avatar Sep 30 '24 10:09 Alizter

I don't see why not. If this change is useful to anyone using Haiku, the change log entry would also be useful

rgrinberg avatar Sep 30 '24 12:09 rgrinberg

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.

@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 avatar Sep 30 '24 20:09 Sylvain78

@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.

Alizter avatar Oct 04 '24 08:10 Alizter