@@ 35,7 35,10 @@ fn shellpipe(mepo: *Mepo, as_async: bool, cmd: []const u8) !void {
var sp_req = try mepo.allocator.create(ShellpipeRequest);
sp_req.cmd = try mepo.allocator.dupeZ(u8, cmd);
sp_req.mepo = mepo;
- if (sdl.SDL_CreateThread(async_shellpipe_run, "async_shellpipe", sp_req)) |sdl_thread| {
+ var id: [10:0]u8 = undefined;
+ std.rand.DefaultPrng.init(0).random().bytes(id[0..]);
+ const id_z = try mepo.allocator.dupeZ(u8, id[0..]);
+ if (sdl.SDL_CreateThread(async_shellpipe_run, id_z, sp_req)) |sdl_thread| {
const thread_id = sdl.SDL_GetThreadID(sdl_thread);
try mepo.async_shellpipe_threads.put(thread_id, void{});
}