Compare commits

..

No commits in common. "7cda28addebcaff003bacc8d1b7e832717a80355" and "a7016f6229afc7898f784568d7d14ccca0bbf6be" have entirely different histories.

2 changed files with 2 additions and 9 deletions

View file

@ -947,7 +947,6 @@ const Node = union(enum) {
while (rest.len > 0) {
if (std.mem.indexOfScalar(u8, rest, '\n')) |eol| {
chunk = rest[0..eol];
chunk = if (chunk.len > 0 and chunk[chunk.len - 1] == '\r') chunk[0 .. chunk.len - 1] else chunk;
rest = rest[eol + 1 ..];
need_eol = true;
} else {

View file

@ -103,10 +103,7 @@ pub fn log_handler(context: usize, parent: tp.pid_ref, arg0: []const u8, output:
const logger = log.logger(@typeName(Self));
defer logger.deinit();
var it = std.mem.splitScalar(u8, output, '\n');
while (it.next()) |line_| if (line_.len > 0) {
const line = if (line_[line_.len - 1] == '\r') line_[0 .. line_.len - 1] else line_;
logger.print("{s}", .{line});
};
while (it.next()) |line| if (line.len > 0) logger.print("{s}", .{line});
}
pub fn log_err_handler(context: usize, parent: tp.pid_ref, arg0: []const u8, output: []const u8) void {
@ -115,10 +112,7 @@ pub fn log_err_handler(context: usize, parent: tp.pid_ref, arg0: []const u8, out
const logger = log.logger(@typeName(Self));
defer logger.deinit();
var it = std.mem.splitScalar(u8, output, '\n');
while (it.next()) |line_| if (line_.len > 0) {
const line = if (line_[line_.len - 1] == '\r') line_[0 .. line_.len - 1] else line_;
logger.print_err(arg0, "{s}", .{line});
};
while (it.next()) |line| logger.print_err(arg0, "{s}", .{line});
}
pub fn log_exit_handler(context: usize, parent: tp.pid_ref, arg0: []const u8, err_msg: []const u8, exit_code: i64) void {