A web browser built in C with the process-isolation model Chrome uses: the browser runs as a controller process, and every tab is a separate child process that can crash without affecting the rest. Built for CSCI 4061 (Operating Systems) by a team of three.
Architecture
A controller process owns the main window and spawns a child process per tab via fork/exec, tracking PIDs in a fixed table and reaping them with waitpid on close. Controller and tabs communicate over Unix IPC: the controller forwards navigation commands to the target tab, and tabs report status back. Because each tab is its own address space, a segfault in one takes down that process only.
Implementation
- Process lifecycle: bounded PID table, signal handling for clean shutdown, no zombie processes left behind.
- URL blacklisting: normalizes URLs (strips
http://,https://,www.) before matching against a blacklist file, so blocked domains cannot be reached through spelling variants. - URL validation: format checks before any navigation is dispatched.
- GTK integration: each process drives its own GTK window, which required keeping GUI event loops and process management from interfering with each other.
The hardest part was debugging across process boundaries, where a stack trace only covers the process that failed.
