https://github.com/davidebeatrici/list-processes
This repository contains code that can be used to retrieve the list of running processes on Windows, Linux, FreeBSD, macOS and generic BSD systems. Pull requests are welcome!
https://github.com/davidebeatrici/list-processes
bsd freebsd id linux list macos name pid process processes windows
Last synced: about 2 months ago
JSON representation
This repository contains code that can be used to retrieve the list of running processes on Windows, Linux, FreeBSD, macOS and generic BSD systems. Pull requests are welcome!
- Host: GitHub
- URL: https://github.com/davidebeatrici/list-processes
- Owner: davidebeatrici
- License: mit
- Created: 2019-10-05T21:19:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-08T02:34:09.000Z (over 6 years ago)
- Last Synced: 2025-07-31T23:26:41.417Z (9 months ago)
- Topics: bsd, freebsd, id, linux, list, macos, name, pid, process, processes, windows
- Language: C
- Homepage:
- Size: 10.7 KB
- Stars: 3
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Build instructions
In the example commands the output binary is specified by the `-o` argument.
### Windows
Build **list-processes_windows.c** with your compiler of choice.
For example, the command for GCC (MinGW) would be:
`gcc list-processes_windows.c -o list-processes.exe`
### Linux
Build **list-processes_linux.c** with your compiler of choice.
For example, the command for GCC would be:
`gcc list-processes_linux.c -o list-processes`
### FreeBSD
Build **list-processes_freebsd.c** with your compiler of choice.
If you get a linker error, make sure you're linking to the `util` library.
For example, the command for Clang would be:
`cc list-processes_freebsd.c -lutil -o list-processes`
### macOS
Build **list-processes_macos.m** with your compiler of choice.
If you get a linker error, make sure you're linking to the `AppKit` framework.
For example, the command for Clang would be:
`cc list-processes_macos.m -framework AppKit -o list-processes`
### Generic BSD
Build **list-processes_bsd.c** with your compiler of choice.
If you get a linker error, make sure you're linking to the `kvm` library.
For example, the command for Clang would be:
`cc list-processes_bsd.c -lkvm -o list-processes`