Function handleChildProcessTerm [src]

Prototype

pub fn handleChildProcessTerm( s: *Step, term: std.process.Child.Term, opt_cwd: ?[]const u8, argv: []const []const u8, ) error{ MakeFailed, OutOfMemory }!void

Parameters

s: *Stepterm: std.process.Child.Termopt_cwd: ?[]const u8argv: []const []const u8

Possible Errors

MakeFailed
OutOfMemory

Source

pub fn handleChildProcessTerm( s: *Step, term: std.process.Child.Term, opt_cwd: ?[]const u8, argv: []const []const u8, ) error{ MakeFailed, OutOfMemory }!void { const arena = s.owner.allocator; switch (term) { .Exited => |code| { if (code != 0) { return s.fail( "the following command exited with error code {d}:\n{s}", .{ code, try allocPrintCmd(arena, opt_cwd, argv) }, ); } }, .Signal, .Stopped, .Unknown => { return s.fail( "the following command terminated unexpectedly:\n{s}", .{try allocPrintCmd(arena, opt_cwd, argv)}, ); }, } }