{"id":18919493,"url":"https://github.com/kurotych/unixsignallistener","last_synced_at":"2026-03-12T19:30:16.478Z","repository":{"id":144474292,"uuid":"261861971","full_name":"kurotych/UnixSignalListener","owner":"kurotych","description":"Single-header C++ wrapper for safe processing UNIX signals","archived":false,"fork":false,"pushed_at":"2020-05-06T20:44:01.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-31T16:22:46.469Z","etag":null,"topics":["handler","signal","single-header-lib","unix","unix-signals"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kurotych.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-05-06T19:41:49.000Z","updated_at":"2022-12-09T03:22:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"44a77d8d-46ba-4a21-a5dd-c350528ffb95","html_url":"https://github.com/kurotych/UnixSignalListener","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurotych%2FUnixSignalListener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurotych%2FUnixSignalListener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurotych%2FUnixSignalListener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurotych%2FUnixSignalListener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kurotych","download_url":"https://codeload.github.com/kurotych/UnixSignalListener/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239914935,"owners_count":19717760,"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":["handler","signal","single-header-lib","unix","unix-signals"],"created_at":"2024-11-08T10:38:00.998Z","updated_at":"2026-03-12T19:30:16.422Z","avatar_url":"https://github.com/kurotych.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C++ wrapper for processing UNIX signals. \nIt is developed according to the common approach for multi-threaded programs. \n\n## Interface:\n \n##### *Block all UNIX signals. Should be called before creating any threads.*\n```void init()```  \n\n---  \n##### *Set function for handling UNIX signal.*\n```void setHandler(int signum, std::function\u003cvoid()\u003e handler, bool terminate = false)```\n\n---\n##### *Listen the unix signals. Blocks current thread. It can be unblocked if handler with flag terminate=true was triggered.*\n```void listen()```\n \n---\n##### *Set signal that terminates listening (without handler)*\n```void setTerminateSignal(int signum)```\n\n---\n##### Set ignoring of a signal. Equals to: signal(signum, SIG_IGN);\n```void setSigIgnore(int signum)```\n\n---\n\n##### Set timeout handler. The handler will be called by timeout if no signals are received.\n```void setTimeoutHandler(uint timeout, std::function\u003cvoid()\u003e handler)```\n\n---\n\nBuild and Run example:\n```\ng++ example.cpp -o unix_example -pthread\n./unix_example\npkill unix_example (from other terminal)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkurotych%2Funixsignallistener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkurotych%2Funixsignallistener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkurotych%2Funixsignallistener/lists"}