Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip use wrapper for managing process #8456

Merged
merged 462 commits into from
Mar 11, 2024
Merged

wip use wrapper for managing process #8456

merged 462 commits into from
Mar 11, 2024

Conversation

Jarred-Sumner
Copy link
Collaborator

@Jarred-Sumner Jarred-Sumner commented Jan 24, 2024

What does this PR do?

This adds bun.spawn.Process which is a reusable way to monitor spawned processes

Fixes: #8588
Fixes: #9211
Fixes: #8896
Fixes: #8917
Fixes: #8360
Fixes: #8357
Fixes: #8539

Copy link
Contributor

github-actions bot commented Jan 26, 2024

src/deps/uws.zig Show resolved Hide resolved
src/bun.zig Show resolved Hide resolved
src/deps/libuv.zig Outdated Show resolved Hide resolved
src/bun.js/api/bun/process.zig Show resolved Hide resolved
src/bun.js/api/bun/process.zig Outdated Show resolved Hide resolved
src/bun.js/api/bun/process.zig Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Jan 26, 2024

Copy link
Contributor

github-actions bot commented Jan 29, 2024

❌🪟 @Jarred-Sumner, there are 15 test regressions on Windows x86_64

  • test\cli\hot\hot.test.ts
  • test\cli\install\migration\migrate.test.ts
  • test\cli\run\env.test.ts
  • test\cli\run\run-eval.test.ts
  • test\cli\run\run-process-env.test.ts
  • test\cli\run\transpiler-cache.test.ts
  • test\js\bun\http\bun-server.test.ts
  • test\js\bun\http\fetch-file-upload.test.ts
  • test\js\bun\spawn\spawn.ipc.test.ts
  • test\js\node\dns\node-dns.test.js
  • test\js\third_party\jsonwebtoken\claim-private.test.js
  • test\js\web\fetch\fetch.unix.test.ts
  • test\js\web\fetch\body-stream.test.ts
  • test\js\web\websocket\websocket.test.js
  • test\js\web\workers\worker.test.ts

Full Test Output

@@ -4553,6 +4556,12 @@ pub const JSValue = enum(JSValueReprInt) {
}

pub fn get(this: JSValue, global: *JSGlobalObject, property: []const u8) ?JSValue {
if (comptime bun.Environment.isDebug) {
if (bun.ComptimeEnumMap(BuiltinName).has(property)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@gvilums gvilums mentioned this pull request Feb 15, 2024
6 tasks
This was referenced Feb 15, 2024
@cirospaciari cirospaciari mentioned this pull request Feb 19, 2024
2 tasks
src/which.zig Outdated
@@ -15,6 +15,10 @@ fn isValid(buf: *bun.PathBuffer, segment: []const u8, bin: []const u8) ?u16 {
// Like /usr/bin/which but without needing to exec a child process
// Remember to resolve the symlink if necessary
pub fn which(buf: *bun.PathBuffer, path: []const u8, cwd: []const u8, bin: []const u8) ?[:0]const u8 {
if (bin.len == 0) return null;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this diff seems to be incorrect

Jarred-Sumner and others added 8 commits March 8, 2024 18:34
* wip

* [autofix.ci] apply automated fixes

* wip 2

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <[email protected]>
Jarred-Sumner and others added 5 commits March 10, 2024 00:40
cc @paperdave. Signals can be run from any thread. This causes an assertion failure when the receiving thread happens to not be the main thread. Easiest to reproduce on linux when you spawn 100 short-lived processes at once.
@Jarred-Sumner Jarred-Sumner marked this pull request as ready for review March 11, 2024 15:23
@Jarred-Sumner Jarred-Sumner merged commit c9fe57f into main Mar 11, 2024
25 of 32 checks passed
@Jarred-Sumner Jarred-Sumner deleted the jarred/process-change branch March 11, 2024 15:24
@Jarred-Sumner
Copy link
Collaborator Author

yay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants