Skip to content

Add support for FreeBSD #251970

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

tagattie
Copy link

This PR contains a set of changes for adding support for FreeBSD.

Basically, FreeBSD can be treated as if it is Linux. So the changes are mainly adding process.platform === 'freebsd', process.platform !== 'freebsd', or case 'freebsd': to wherever it checks the OS is Linux with a few exceptions where the check is for really Linux-specific.

I would much appreciate it if this PR is considered for merging.

Relate PR: microsoft/vscode-deviceid#25
Related Issues: #1359, #30046, #32409, #74857, #129928

tagattie added 4 commits June 20, 2025 15:37
Basically FreeBSD can be treated as if it is Linux. So the changes are just adding process.platform === 'freebsd', process.platform !== 'freebsd', or case 'freebsd': to wherever it checks the OS is Linux with few exceptions where the check is for really Linux-specific.
There are no /proc/version file in the FreeBSD's procfs. So redirect "No such file or directory" message to /dev/null.
FreeBSD is not a glibc-based system.
The format '-o pid=,ppid=,pcpu=,pmem=,command=' is not supported by FreeBSD. So adjust it so that the arguments can be accepted by ps command on both Linux and FreeBSD.
@benz0li
Copy link

benz0li commented Jun 21, 2025

@joaomoreno Please consider this PR. It seems to make @tagattie life easier to maintain the FreeBSD port.

He is the official maintainer of https://www.freshports.org/editors/vscode.

FYI @bpasero

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

Successfully merging this pull request may close these issues.

3 participants