mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
32 lines
848 B
Zig
32 lines
848 B
Zig
const IPC = @import("../bun.js/ipc.zig");
|
|
const Allocator = std.mem.Allocator;
|
|
const uws = bun.uws;
|
|
const std = @import("std");
|
|
const default_allocator = bun.default_allocator;
|
|
const bun = @import("bun");
|
|
const Environment = bun.Environment;
|
|
const Async = bun.Async;
|
|
const JSC = bun.JSC;
|
|
const JSValue = JSC.JSValue;
|
|
const JSGlobalObject = JSC.JSGlobalObject;
|
|
const Which = @import("../which.zig");
|
|
const Output = bun.Output;
|
|
const PosixSpawn = @import("../bun.js/api/bun/spawn.zig").PosixSpawn;
|
|
const posix = std.posix;
|
|
|
|
pub const OutKind = enum {
|
|
stdout,
|
|
stderr,
|
|
|
|
pub fn toFd(this: OutKind) bun.FileDescriptor {
|
|
return switch (this) {
|
|
.stdout => .stdout(),
|
|
.stderr => .stderr(),
|
|
};
|
|
}
|
|
};
|
|
|
|
pub const Stdio = bun.spawn.Stdio;
|
|
|
|
pub const WatchFd = if (Environment.isLinux) posix.fd_t else i32;
|