{"id":28521583,"url":"https://github.com/azersd/taskmaster","last_synced_at":"2025-07-04T00:31:55.580Z","repository":{"id":297489206,"uuid":"996955881","full_name":"AzerSD/TaskMaster","owner":"AzerSD","description":"a Job Control System like Supervisord","archived":false,"fork":false,"pushed_at":"2025-06-05T18:35:50.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-05T19:26:50.345Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AzerSD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-05T18:10:50.000Z","updated_at":"2025-06-05T18:35:52.000Z","dependencies_parsed_at":"2025-06-05T19:27:48.373Z","dependency_job_id":"ec7f6503-3955-4d37-987b-7102b94af3a8","html_url":"https://github.com/AzerSD/TaskMaster","commit_stats":null,"previous_names":["azersd/taskmaster"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AzerSD/TaskMaster","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AzerSD%2FTaskMaster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AzerSD%2FTaskMaster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AzerSD%2FTaskMaster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AzerSD%2FTaskMaster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AzerSD","download_url":"https://codeload.github.com/AzerSD/TaskMaster/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AzerSD%2FTaskMaster/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263426113,"owners_count":23464793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-09T08:12:57.443Z","updated_at":"2025-07-04T00:31:55.564Z","avatar_url":"https://github.com/AzerSD.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧩 Taskmaster (C++ Job Control System)\n\n## 📘 Project Description\n\n**Taskmaster** is a job control system inspired by `supervisord`. It monitors and manages long-running processes based on a configuration file. It supports process control, automatic restarts, and a command-line interface for interacting with managed processes.\n\nThis project is implemented in **C++**, using only the **standard library** (with exceptions for parsing config files). It is designed to run in the foreground and not as a true daemon.\n\n---\n\n## ✅ To-Do List\n\n### 🔧 Core Functionality\n\n- [x] Parse configuration file (YAML or custom format)\n- [x] Launch processes based on configuration\n- [ ] Monitor processes and track status (alive/dead)\n- [ ] Implement auto-restart logic based on config\n- [ ] Handle `SIGHUP` to reload configuration\n- [ ] Hot-reload without affecting unchanged processes\n- [ ] Implement process logging system (file-based)\n\n### 🖥️ Control Shell\n\n- [ ] Start interactive shell in foreground\n- [ ] Add command: `status`\n- [ ] Add command: `start \u003cname\u003e`\n- [ ] Add command: `stop \u003cname\u003e`\n- [ ] Add command: `restart \u003cname\u003e`\n- [ ] Add command: `reload`\n- [ ] Add command: `exit`\n- [ ] Implement line editing \u0026 command history\n\n### 📁 Configuration Support\n\n- [ ] Support all required config options:\n  - [ ] `cmd`\n  - [ ] `numprocs`\n  - [ ] `autostart`\n  - [ ] `autorestart` (always / never / unexpected)\n  - [ ] `exitcodes`\n  - [ ] `startretries`, `starttime`\n  - [ ] `stopsignal`, `stoptime`\n  - [ ] `stdout`, `stderr`\n  - [ ] `env`\n  - [ ] `workingdir`\n  - [ ] `umask`\n\n### 🧪 Testing \u0026 Edge Cases\n\n- [ ] Handle invalid config entries\n- [ ] Handle programs that crash immediately\n- [ ] Simulate manual process kills\n- [ ] Test high-output programs\n- [ ] Test multiple process instances per program\n\n---\n\n## 🎯 Learning Objectives\n\n- Deep understanding of Unix **process management** (fork/exec, signals, waitpid)\n- Mastering **inter-process communication**\n- Advanced **file I/O** and **logging**\n- Using **signals** in C++ (`signal`, `sigaction`)\n- Implementing a **command-line interface** from scratch\n- Working with **configuration files** (YAML or manual parsing)\n- Managing **process groups** and **graceful shutdowns**\n\n---\n\n## 🛠 Recommended Tools / Libraries\n\n- **C++17+** with STL\n- [`yaml-cpp`](https://github.com/jbeder/yaml-cpp) – for YAML parsing (optional)\n- `std::thread`, `std::mutex`, `std::condition_variable` – for concurrency\n- `readline` or custom implementation – for CLI editing/history\n- `std::filesystem` – for file and directory handling\n\n---\n\n## 🔗 References\n\n- [`supervisord`](http://supervisord.org/) – inspiration/reference\n- `man 2 fork`, `man 2 execve`, `man 2 waitpid`\n- `man 7 signal`, `man 2 kill`\n- [Linux Process Management Guide (TLPI)](https://man7.org/tlpi/)\n\n---\n\n## 📦 Final Deliverable\n\n- Source code with Makefile\n- Example configuration file\n- README and documentation\n- Test scripts or manual test cases\n\n---\n\n## ✍ Author\n\n- Azer Sioud | asioud\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazersd%2Ftaskmaster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazersd%2Ftaskmaster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazersd%2Ftaskmaster/lists"}