{"id":19031090,"url":"https://github.com/alexito4/trap","last_synced_at":"2025-04-17T12:31:52.548Z","repository":{"id":147635520,"uuid":"59934232","full_name":"alexito4/Trap","owner":"alexito4","description":"It’s a trap! Catch OS signals in Swift. Swift Signal Handler.","archived":true,"fork":false,"pushed_at":"2017-03-06T10:07:05.000Z","size":8,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T08:28:04.315Z","etag":null,"topics":["os","signal","swift","trap"],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/alexito4.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}},"created_at":"2016-05-29T08:47:03.000Z","updated_at":"2024-10-03T12:46:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"58698dcd-869e-4b4d-9f1c-a576ef4860ad","html_url":"https://github.com/alexito4/Trap","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexito4%2FTrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexito4%2FTrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexito4%2FTrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexito4%2FTrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexito4","download_url":"https://codeload.github.com/alexito4/Trap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249341833,"owners_count":21254195,"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":["os","signal","swift","trap"],"created_at":"2024-11-08T21:21:23.980Z","updated_at":"2025-04-17T12:31:52.539Z","avatar_url":"https://github.com/alexito4.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trap\n\n![Giphy](http://media3.giphy.com/media/3ornka9rAaKRA2Rkac/giphy.gif)\n\nTrap is a small Swift framework to handle operating system signals.\n\n## Usage\n\n    import Trap\n    \n    let task = NSTask...\n    \n    Trap.handle(.interrupt) {\n        task.terminate()\n        exit(EXIT_FAILURE)\n    }\n    \n    task.launch()\n    \nIt can also handle multiple signals at the same time.\n\n    Trap.handle(Trap.Signal.all) {\n        print(\"Signal: \\($0)\")\n        ...\n    }\n\n## Requirements\n\nTrap is build using the stable version of **Swift 3.0**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexito4%2Ftrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexito4%2Ftrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexito4%2Ftrap/lists"}