mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> Co-authored-by: Grigory <grigory.orlov.set@gmail.com> Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com> Co-authored-by: Meghan Denny <hello@nektro.net> Co-authored-by: Kenta Iwasaki <63115601+lithdew@users.noreply.github.com> Co-authored-by: John-David Dalton <john.david.dalton@gmail.com> Co-authored-by: Dale Seo <5466341+DaleSeo@users.noreply.github.com> Co-authored-by: Zack Radisic <56137411+zackradisic@users.noreply.github.com> Co-authored-by: paperdave <paperdave@users.noreply.github.com> Co-authored-by: Georgijs Vilums <georgijs.vilums@gmail.com> Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
31 lines
860 B
Zig
31 lines
860 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("root").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 => bun.STDOUT_FD,
|
|
.stderr => bun.STDERR_FD,
|
|
};
|
|
}
|
|
};
|
|
|
|
pub const Stdio = bun.spawn.Stdio;
|
|
|
|
pub const WatchFd = if (Environment.isLinux) posix.fd_t else i32;
|