new plan for process supervision
All checks were successful
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Successful in 1m36s
All checks were successful
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Successful in 1m36s
This commit is contained in:
parent
8227857563
commit
9941e0cebb
|
@ -48,13 +48,16 @@ fn runStandaloneServerParent(allocator: ?std.mem.Allocator, event_handler: inter
|
|||
try al.append(a);
|
||||
}
|
||||
// Parent
|
||||
var cp = std.ChildProcess.init(al.items, aa);
|
||||
cp.stdin = std.io.getStdIn();
|
||||
cp.stdout = std.io.getStdOut();
|
||||
cp.stderr = std.io.getStdErr();
|
||||
const stdin = std.io.getStdIn();
|
||||
const stdout = std.io.getStdOut();
|
||||
const stderr = std.io.getStdErr();
|
||||
while (true) {
|
||||
var cp = std.ChildProcess.init(al.items, aa);
|
||||
cp.stdin = stdin;
|
||||
cp.stdout = stdout;
|
||||
cp.stderr = stderr;
|
||||
_ = try cp.spawnAndWait();
|
||||
try cp.stderr.?.writeAll("Caught abnormal process termination, relaunching server");
|
||||
try stderr.writeAll("Caught abnormal process termination, relaunching server");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user