Open milantracy opened 3 years ago
some use cases are listed at https://github.com/oven-sh/bun/issues/5803#issuecomment-1742964299
I will start work on it
This API has lots of surface area with various associated system calls. It would be good to enumerate them and to sort them by whether or not bun uses them.
Might also be good to add a tests for the bun runtime, similar to our node runtime tests.
Syscalls that are expected to be done are listed in the order of priorities:
It seems hard to believe that pidfd_open
is the only one bun expects. Why use pidfd_open
at all if the program is not going to use the functionality that pidfd offers?
You can poll(2)
on FD returned by pidfd_open()
to get a notification when the process represented by that pidfd exits. So maybe that's how bun uses it?
is the only one bun expects. Why use
pidfd_open
at all if the program is not going to use the functionality that pidfd offers?
I didn't read into very details of their code base, as they said google-auth-library
is the one who introduces the issue, the program crashed when it sees the pidfd_open
. I will add pidfd_open to see if there is anything I shall follow with.
You can
poll(2)
on FD returned bypidfd_open()
to get a notification when the process represented by that pidfd exits. So maybe that's how bun uses it?
from https://github.com/oven-sh/bun/pull/6724 , they are working around the issue in a very similar way
Description
Implement pidfd API for gVisor.
See https://lwn.net/Articles/794707/ for details
Is this feature related to a specific bug?
N/A
Do you have a specific solution in mind?