2 Commits

Author SHA1 Message Date
ccc0d98bd7 release: 0.3.2
All checks were successful
Release / Create release (push) Successful in 48s
Test / Create distribution (push) Successful in 28s
Test / Sandbox (push) Successful in 42s
Test / Sandbox (race detector) (push) Successful in 41s
Test / Hpkg (push) Successful in 44s
Test / Hakurei (race detector) (push) Successful in 7m4s
Test / Hakurei (push) Successful in 4m2s
Test / Flake checks (push) Successful in 1m40s
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-09 08:12:52 +09:00
a3fd05765e container: load initial process started before syscall
All checks were successful
Test / Create distribution (push) Successful in 27s
Test / Sandbox (push) Successful in 2m50s
Test / Sandbox (race detector) (push) Successful in 5m3s
Test / Hpkg (push) Successful in 5m21s
Test / Hakurei (push) Successful in 5m47s
Test / Hakurei (race detector) (push) Successful in 7m7s
Test / Flake checks (push) Successful in 1m39s
This avoids a race between returning from syscall and checking the state.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-09 08:12:22 +09:00
2 changed files with 9 additions and 2 deletions

View File

@@ -380,6 +380,9 @@ func initEntrypoint(k syscallDispatcher, msg message.Msg) {
err error
wpid = -2
wstatus WaitStatus
// whether initial process has started
started bool
)
// keep going until no child process is left
@@ -406,6 +409,10 @@ func initEntrypoint(k syscallDispatcher, msg message.Msg) {
}
}
if !started {
started = initialProcessStarted.Load()
}
err = EINTR
for errors.Is(err, EINTR) {
wpid, err = k.wait4(-1, &wstatus, 0, nil)
@@ -414,7 +421,7 @@ func initEntrypoint(k syscallDispatcher, msg message.Msg) {
if !errors.Is(err, ECHILD) {
k.printf(msg, "unexpected wait4 response: %v", err)
} else if !initialProcessStarted.Load() {
} else if !started {
// initial process has not yet been reached and all daemons
// terminated or none were started in the first place
time.Sleep(500 * time.Microsecond)

View File

@@ -32,7 +32,7 @@
buildGoModule rec {
pname = "hakurei";
version = "0.3.1";
version = "0.3.2";
srcFiltered = builtins.path {
name = "${pname}-src";