Skip to content

Commit

Permalink
proc/PID is not available on mac (#37067)
Browse files Browse the repository at this point in the history
  • Loading branch information
salmin89 authored Dec 4, 2024
1 parent 14d5d88 commit 3ee0546
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,10 @@ async function readFullAsync(length, buffer = new Uint8Array(65536)) {
}

async function sendMessage(message) {
const header = new Uint32Array([message.length]);
const stdout = await fs.open(`/proc/${process.pid}/fd/1`, "w");
const header = Buffer.from(new Uint32Array([message.length]).buffer);
const stdout = process.stdout;
await stdout.write(header);
await stdout.write(message);
await stdout.close();
}

while (true) {
Expand Down

0 comments on commit 3ee0546

Please sign in to comment.