{"id":16061814,"url":"https://github.com/watson1978/rmagick-issue483","last_synced_at":"2025-11-30T21:30:14.223Z","repository":{"id":136941227,"uuid":"221011420","full_name":"Watson1978/rmagick-issue483","owner":"Watson1978","description":null,"archived":false,"fork":false,"pushed_at":"2019-11-11T15:55:57.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-28T12:47:53.678Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Watson1978.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":"2019-11-11T15:29:42.000Z","updated_at":"2019-11-11T15:55:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"ab0ddf0c-958a-408e-9dd7-8e7f4e663a97","html_url":"https://github.com/Watson1978/rmagick-issue483","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/Watson1978%2Frmagick-issue483","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Watson1978%2Frmagick-issue483/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Watson1978%2Frmagick-issue483/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Watson1978%2Frmagick-issue483/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Watson1978","download_url":"https://codeload.github.com/Watson1978/rmagick-issue483/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239646237,"owners_count":19673999,"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":"2024-10-09T04:20:39.840Z","updated_at":"2025-11-30T21:30:14.161Z","avatar_url":"https://github.com/Watson1978.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 使い方\n\n```\n$ ./setup.sh\n$ ruby sample.rb\n```\n\n## 再現環境\n* Ruby 2.6.0 以降\n* macOS 10.15 (試した環境)\n\n## 問題の説明\nmacOS 上で Ruby 2.6.0 以降を使用した際に、拡張ライブラリ内で `fork()/exec()` で外部コマンドを実行したあと `waitpid()` をコールすると失敗するようになりました。\n私がメンテナンスしている RMagick 利用している ImageMagick が PDF を処理する際にこのような処理を行っており、macOS + Ruby 2.6.0 以降で処理に失敗するようになり困っております。\n\nhttps://github.com/Watson1978/rmagick-issue483 に再現コードを用意しており、以下の様に実行していただくと Ruby 2.6.0 以降でエラー終了します。\n\n```\n$ ./setup.sh\n$ ruby sample.rb\n$ ruby sample.rb\nRuby v2.6.0\nError waitpid(): Interrupted system call\n```\n\n```\n$ ./setup.sh\n$ ruby ./sample.rb\nRuby v2.6.5\nError waitpid(): Interrupted system call\n```\n\n\n\nRuby 2.5.x 以下ですと期待通りに `WIFEXITED` のパスを通り正常に終了します。\n\n```\n$ ./setup.sh\n$ ruby sample.rb\nRuby v2.5.7\n(1) WIFEXITED : status = 0\n```\n\n```\n$ ./setup.sh\n$ ruby sample.rb\nRuby v2.3.8\n(1) WIFEXITED : status = 0\n```\n\n確認した限り、macOS 上だけでこの現象が発生します。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatson1978%2Frmagick-issue483","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwatson1978%2Frmagick-issue483","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatson1978%2Frmagick-issue483/lists"}