Custom Shell
- 3 Devlogs
- 23 Total hours
A CUSTOM HARDWARE AWARE SHELL
A CUSTOM HARDWARE AWARE SHELL
In the updated version I have been working on improving : POSIX Pipelines (|): Fixed pointer bugs to successfully chain commands and stream output directly between processes. Asynchronous Jobs (&): Added non-blocking execution to allow tasks to run silently in the background. Process Management: Built a SIGCHLD signal handler to automatically reap zombie processes and prevent system leaks. Arena Allocator: Ripped out dynamic malloc calls and replaced them with a zero-allocation static memory arena for maximum parsing speed. Hardware Telemetry: Embedded monotonic clocks to measure the exact nanosecond latency of new hot path.
Path to Version 2.0
I received feedback on v1.0 regarding the distribution of binaries. I have treated this not just as a fix, but as an opportunity to move to a fully modularised, production grade build system.
What I am changing for Version 2.0 ?
Automated Build System: I have implemented a professional Makefile that handles compilation, dependency management, and binary generation. This ensures that any reviewer can clone the repo, run make, and have a working binary in seconds.
Binary Distribution: v2.0 will include the pre-compiled hsh binary attached directly to the GitHub release, ensuring instant usability.
Error Handling: Version 2.0 will introduce specific error handling for non-existent commands and restricted directory access, moving away from simple execution to a “user-proof” shell experience.
My Goal for v2.0
To ship a fully functional, stable Unix like shell that demonstrates deep integration with the Linux Kernel via system calls, providing a seamless experience for the end user.
I have spent the last few days building a custom Unix shell ‘hsh’ version 1.0 entirely in C. It’s been a crazy ride. I started out not knowing much about an Operating System .