From 5755a2c5619c71fba862590531897617d4a503a9 Mon Sep 17 00:00:00 2001 From: MK Date: Wed, 25 Feb 2026 20:36:26 +0800 Subject: [PATCH] fix: clear FD_CLOEXEC on stdio fds in spawn_inherited https://github.com/voidzero-dev/vite-task/pull/172 --- Cargo.lock | 36 +++++++++---------- Cargo.toml | 12 +++---- .../synthetic-build-cache-disabled/snap.txt | 8 +++++ .../synthetic-dev-cache-disabled/snap.txt | 35 ++++++++++++++++++ 4 files changed, 67 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 99ba9f752a..9481c06ae8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1747,7 +1747,7 @@ dependencies = [ [[package]] name = "fspy" version = "0.1.0" -source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=261c5676b2085a31d5edf4c5f76c281992ca96f3#261c5676b2085a31d5edf4c5f76c281992ca96f3" +source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=97e7aac732da3147d8762a8862933c4889bbcdfb#97e7aac732da3147d8762a8862933c4889bbcdfb" dependencies = [ "allocator-api2", "anyhow", @@ -1782,7 +1782,7 @@ dependencies = [ [[package]] name = "fspy_detours_sys" version = "0.0.0" -source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=261c5676b2085a31d5edf4c5f76c281992ca96f3#261c5676b2085a31d5edf4c5f76c281992ca96f3" +source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=97e7aac732da3147d8762a8862933c4889bbcdfb#97e7aac732da3147d8762a8862933c4889bbcdfb" dependencies = [ "cc", "winapi", @@ -1791,7 +1791,7 @@ dependencies = [ [[package]] name = "fspy_preload_unix" version = "0.0.0" -source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=261c5676b2085a31d5edf4c5f76c281992ca96f3#261c5676b2085a31d5edf4c5f76c281992ca96f3" +source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=97e7aac732da3147d8762a8862933c4889bbcdfb#97e7aac732da3147d8762a8862933c4889bbcdfb" dependencies = [ "anyhow", "bincode", @@ -1806,7 +1806,7 @@ dependencies = [ [[package]] name = "fspy_preload_windows" version = "0.1.0" -source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=261c5676b2085a31d5edf4c5f76c281992ca96f3#261c5676b2085a31d5edf4c5f76c281992ca96f3" +source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=97e7aac732da3147d8762a8862933c4889bbcdfb#97e7aac732da3147d8762a8862933c4889bbcdfb" dependencies = [ "bincode", "constcat", @@ -1822,7 +1822,7 @@ dependencies = [ [[package]] name = "fspy_seccomp_unotify" version = "0.1.0" -source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=261c5676b2085a31d5edf4c5f76c281992ca96f3#261c5676b2085a31d5edf4c5f76c281992ca96f3" +source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=97e7aac732da3147d8762a8862933c4889bbcdfb#97e7aac732da3147d8762a8862933c4889bbcdfb" dependencies = [ "bincode", "futures-util", @@ -1839,7 +1839,7 @@ dependencies = [ [[package]] name = "fspy_shared" version = "0.0.0" -source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=261c5676b2085a31d5edf4c5f76c281992ca96f3#261c5676b2085a31d5edf4c5f76c281992ca96f3" +source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=97e7aac732da3147d8762a8862933c4889bbcdfb#97e7aac732da3147d8762a8862933c4889bbcdfb" dependencies = [ "allocator-api2", "bincode", @@ -1857,7 +1857,7 @@ dependencies = [ [[package]] name = "fspy_shared_unix" version = "0.0.0" -source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=261c5676b2085a31d5edf4c5f76c281992ca96f3#261c5676b2085a31d5edf4c5f76c281992ca96f3" +source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=97e7aac732da3147d8762a8862933c4889bbcdfb#97e7aac732da3147d8762a8862933c4889bbcdfb" dependencies = [ "anyhow", "base64 0.22.1", @@ -4545,7 +4545,7 @@ dependencies = [ [[package]] name = "pty_terminal_test_client" version = "0.0.0" -source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=261c5676b2085a31d5edf4c5f76c281992ca96f3#261c5676b2085a31d5edf4c5f76c281992ca96f3" +source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=97e7aac732da3147d8762a8862933c4889bbcdfb#97e7aac732da3147d8762a8862933c4889bbcdfb" [[package]] name = "quinn" @@ -7190,7 +7190,7 @@ dependencies = [ [[package]] name = "vite_glob" version = "0.0.0" -source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=261c5676b2085a31d5edf4c5f76c281992ca96f3#261c5676b2085a31d5edf4c5f76c281992ca96f3" +source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=97e7aac732da3147d8762a8862933c4889bbcdfb#97e7aac732da3147d8762a8862933c4889bbcdfb" dependencies = [ "thiserror 2.0.18", "wax", @@ -7230,7 +7230,7 @@ dependencies = [ [[package]] name = "vite_graph_ser" version = "0.1.0" -source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=261c5676b2085a31d5edf4c5f76c281992ca96f3#261c5676b2085a31d5edf4c5f76c281992ca96f3" +source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=97e7aac732da3147d8762a8862933c4889bbcdfb#97e7aac732da3147d8762a8862933c4889bbcdfb" dependencies = [ "petgraph 0.8.3", "serde", @@ -7310,7 +7310,7 @@ dependencies = [ [[package]] name = "vite_path" version = "0.1.0" -source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=261c5676b2085a31d5edf4c5f76c281992ca96f3#261c5676b2085a31d5edf4c5f76c281992ca96f3" +source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=97e7aac732da3147d8762a8862933c4889bbcdfb#97e7aac732da3147d8762a8862933c4889bbcdfb" dependencies = [ "bincode", "diff-struct", @@ -7323,7 +7323,7 @@ dependencies = [ [[package]] name = "vite_select" version = "0.0.0" -source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=261c5676b2085a31d5edf4c5f76c281992ca96f3#261c5676b2085a31d5edf4c5f76c281992ca96f3" +source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=97e7aac732da3147d8762a8862933c4889bbcdfb#97e7aac732da3147d8762a8862933c4889bbcdfb" dependencies = [ "anyhow", "crossterm", @@ -7348,7 +7348,7 @@ dependencies = [ [[package]] name = "vite_shell" version = "0.0.0" -source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=261c5676b2085a31d5edf4c5f76c281992ca96f3#261c5676b2085a31d5edf4c5f76c281992ca96f3" +source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=97e7aac732da3147d8762a8862933c4889bbcdfb#97e7aac732da3147d8762a8862933c4889bbcdfb" dependencies = [ "bincode", "brush-parser", @@ -7361,7 +7361,7 @@ dependencies = [ [[package]] name = "vite_str" version = "0.1.0" -source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=261c5676b2085a31d5edf4c5f76c281992ca96f3#261c5676b2085a31d5edf4c5f76c281992ca96f3" +source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=97e7aac732da3147d8762a8862933c4889bbcdfb#97e7aac732da3147d8762a8862933c4889bbcdfb" dependencies = [ "bincode", "compact_str", @@ -7372,7 +7372,7 @@ dependencies = [ [[package]] name = "vite_task" version = "0.0.0" -source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=261c5676b2085a31d5edf4c5f76c281992ca96f3#261c5676b2085a31d5edf4c5f76c281992ca96f3" +source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=97e7aac732da3147d8762a8862933c4889bbcdfb#97e7aac732da3147d8762a8862933c4889bbcdfb" dependencies = [ "anyhow", "async-trait", @@ -7408,7 +7408,7 @@ dependencies = [ [[package]] name = "vite_task_graph" version = "0.1.0" -source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=261c5676b2085a31d5edf4c5f76c281992ca96f3#261c5676b2085a31d5edf4c5f76c281992ca96f3" +source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=97e7aac732da3147d8762a8862933c4889bbcdfb#97e7aac732da3147d8762a8862933c4889bbcdfb" dependencies = [ "anyhow", "async-trait", @@ -7429,7 +7429,7 @@ dependencies = [ [[package]] name = "vite_task_plan" version = "0.1.0" -source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=261c5676b2085a31d5edf4c5f76c281992ca96f3#261c5676b2085a31d5edf4c5f76c281992ca96f3" +source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=97e7aac732da3147d8762a8862933c4889bbcdfb#97e7aac732da3147d8762a8862933c4889bbcdfb" dependencies = [ "anyhow", "async-trait", @@ -7455,7 +7455,7 @@ dependencies = [ [[package]] name = "vite_workspace" version = "0.0.0" -source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=261c5676b2085a31d5edf4c5f76c281992ca96f3#261c5676b2085a31d5edf4c5f76c281992ca96f3" +source = "git+ssh://git@github.com/voidzero-dev/vite-task.git?rev=97e7aac732da3147d8762a8862933c4889bbcdfb#97e7aac732da3147d8762a8862933c4889bbcdfb" dependencies = [ "petgraph 0.8.3", "rustc-hash", diff --git a/Cargo.toml b/Cargo.toml index ba64f3900e..6d86ab6e28 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -82,7 +82,7 @@ dunce = "1.0.5" fast-glob = "1.0.0" flate2 = { version = "=1.1.5", features = ["zlib-rs"] } form_urlencoded = "1.2.1" -fspy = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "261c5676b2085a31d5edf4c5f76c281992ca96f3" } +fspy = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "97e7aac732da3147d8762a8862933c4889bbcdfb" } futures = "0.3.31" futures-util = "0.3.31" glob = "0.3.2" @@ -181,14 +181,14 @@ vfs = "0.12.1" vite_command = { path = "crates/vite_command" } vite_error = { path = "crates/vite_error" } vite_js_runtime = { path = "crates/vite_js_runtime" } -vite_glob = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "261c5676b2085a31d5edf4c5f76c281992ca96f3" } +vite_glob = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "97e7aac732da3147d8762a8862933c4889bbcdfb" } vite_install = { path = "crates/vite_install" } vite_migration = { path = "crates/vite_migration" } vite_shared = { path = "crates/vite_shared" } -vite_path = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "261c5676b2085a31d5edf4c5f76c281992ca96f3" } -vite_str = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "261c5676b2085a31d5edf4c5f76c281992ca96f3" } -vite_task = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "261c5676b2085a31d5edf4c5f76c281992ca96f3" } -vite_workspace = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "261c5676b2085a31d5edf4c5f76c281992ca96f3" } +vite_path = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "97e7aac732da3147d8762a8862933c4889bbcdfb" } +vite_str = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "97e7aac732da3147d8762a8862933c4889bbcdfb" } +vite_task = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "97e7aac732da3147d8762a8862933c4889bbcdfb" } +vite_workspace = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "97e7aac732da3147d8762a8862933c4889bbcdfb" } walkdir = "2.5.0" wax = "0.6.0" which = "8.0.0" diff --git a/packages/cli/snap-tests/synthetic-build-cache-disabled/snap.txt b/packages/cli/snap-tests/synthetic-build-cache-disabled/snap.txt index ec1f1622b5..2f1840a8f0 100644 --- a/packages/cli/snap-tests/synthetic-build-cache-disabled/snap.txt +++ b/packages/cli/snap-tests/synthetic-build-cache-disabled/snap.txt @@ -1,3 +1,11 @@ > vp run build # synthetic build (vp build) should have cache disabled without cacheScripts $ vp build ⊘ cache disabled +vite+ v building client environment for production... + transforming...✓ modules transformed. +rendering chunks... +computing gzip size... +dist/index.html kB │ gzip: kB +dist/assets/index-BnIqjoTZ.js kB │ gzip: kB + +✓ built in ms diff --git a/packages/cli/snap-tests/synthetic-dev-cache-disabled/snap.txt b/packages/cli/snap-tests/synthetic-dev-cache-disabled/snap.txt index 411523e1df..c157174a03 100644 --- a/packages/cli/snap-tests/synthetic-dev-cache-disabled/snap.txt +++ b/packages/cli/snap-tests/synthetic-dev-cache-disabled/snap.txt @@ -1,3 +1,38 @@ > vp run dev # synthetic dev (vp dev) should have cache disabled even with cacheScripts $ vp dev --help ⊘ cache disabled +vp/ + +Usage: + $ vp [root] + +Commands: + [root] start dev server + build [root] build for production + optimize [root] pre-bundle dependencies (deprecated, the pre-bundle process runs automatically and does not need to be called) + preview [root] locally preview production build + +For more info, run any command with the `--help` flag: + $ vp --help + $ vp build --help + $ vp optimize --help + $ vp preview --help + +Options: + --host [host] [string] specify hostname + --port [number] specify port + --open [path] [boolean | string] open browser on startup + --cors [boolean] enable CORS + --strictPort [boolean] exit if specified port is already in use + --force [boolean] force the optimizer to ignore the cache and re-bundle + --experimentalBundle [boolean] use experimental full bundle mode (this is highly experimental) + -c, --config [string] use specified config file + --base [string] public base path (default: /) + -l, --logLevel [string] info | warn | error | silent + --clearScreen [boolean] allow/disable clear screen when logging + --configLoader [string] use 'bundle' to bundle the config with Rolldown, or 'runner' (experimental) to process it on the fly, or 'native' (experimental) to load using the native runtime (default: bundle) + -d, --debug [feat] [string | boolean] show debug logs + -f, --filter [string] filter debug logs + -m, --mode [string] set env mode + -h, --help Display this message + -v, --version Display version number