WIP Make process.stdout sync on windows (#9398)

* Make some things sync on windows

* WIP

* WIP

* remove uses to uv_default_loop

* remove a compiler warning on windows

* edfghjk

* Windows build fixes

* Fixup

* bundows

* Add quotes

* Fix --cwd arg on Windows

* comment

* move this up

* Fix some tests

* `mv` tests pass

* spawn.test passes again

* Allow .sh file extension for Windows

* Unmark failing tests

* env test pass

* windows

* Fix some tests

* Update ProcessBindingTTYWrap.cpp

* Update CMakeLists.txt

* Set tmpdir

* Make it 5s on windows

* Fixup

* Fixup

* Update ProcessBindingTTYWrap.cpp

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: dave caruso <me@paperdave.net>
This commit is contained in:
Jarred Sumner
2024-03-18 19:35:34 -07:00
committed by GitHub
parent e1593ce2e5
commit 76ced7c6ed
46 changed files with 669 additions and 267 deletions

View File

@@ -385,13 +385,17 @@ pub export fn Bun__onDidAppendPlugin(jsc_vm: *VirtualMachine, globalObject: *JSG
jsc_vm.bundler.linker.plugin_runner = &jsc_vm.plugin_runner.?;
}
// pub fn getGlobalExitCodeForPipeFailure() u8 {
// if (VirtualMachine.is_main_thread_vm) {
// return VirtualMachine.get().exit_handler.exit_code;
// }
const WindowsOnly = struct {
pub fn Bun__ZigGlobalObject__uvLoop(jsc_vm: *VirtualMachine) callconv(.C) *bun.windows.libuv.Loop {
return jsc_vm.uvLoop();
}
};
// return 0;
// }
comptime {
if (Environment.isWindows) {
@export(WindowsOnly.Bun__ZigGlobalObject__uvLoop, .{ .name = "Bun__ZigGlobalObject__uvLoop" });
}
}
pub const ExitHandler = struct {
exit_code: u8 = 0,