{"action":"created","issue":{"url":"https://api.github.com/repos/fastlane/fastlane_core/issues/32","labels_url":"https://api.github.com/repos/fastlane/fastlane_core/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/fastlane/fastlane_core/issues/32/comments","events_url":"https://api.github.com/repos/fastlane/fastlane_core/issues/32/events","html_url":"https://github.com/fastlane/fastlane_core/issues/32","id":106674503,"number":32,"title":"Fastlane doesn't wait on its child processes before returning","user":{"login":"cuva","id":1389642,"avatar_url":"https://avatars.githubusercontent.com/u/1389642?v=3","gravatar_id":"","url":"https://api.github.com/users/cuva","html_url":"https://github.com/cuva","followers_url":"https://api.github.com/users/cuva/followers","following_url":"https://api.github.com/users/cuva/following{/other_user}","gists_url":"https://api.github.com/users/cuva/gists{/gist_id}","starred_url":"https://api.github.com/users/cuva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuva/subscriptions","organizations_url":"https://api.github.com/users/cuva/orgs","repos_url":"https://api.github.com/users/cuva/repos","events_url":"https://api.github.com/users/cuva/events{/privacy}","received_events_url":"https://api.github.com/users/cuva/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-16T00:37:40Z","updated_at":"2015-09-16T00:40:29Z","closed_at":null,"body":"Hello,\r\n\r\nI'm experiencing an issue with `fastlane` when its being trigerred by my CI (Gitlab CI). Note that it doesn't happen if I manually launch `fastlane` on my CI machine through SSH.\r\n\r\nThe following stack track appears after the lane finishes successfully:\r\n\r\n```\r\n/path/excon-0.45.4/lib/excon/socket.rb:138:in `select': Interrupt\r\n  from /path/excon-0.45.4/lib/excon/socket.rb:138:in `rescue in block in connect'\r\n  from /path/excon-0.45.4/lib/excon/socket.rb:119:in `block in connect'\r\n  from /path/excon-0.45.4/lib/excon/socket.rb:110:in `each'\r\n  from /path/excon-0.45.4/lib/excon/socket.rb:110:in `connect'\r\n  from /path/excon-0.45.4/lib/excon/ssl_socket.rb:148:in `connect'\r\n  from /path/excon-0.45.4/lib/excon/socket.rb:28:in `initialize'\r\n  from /path/excon-0.45.4/lib/excon/ssl_socket.rb:8:in `initialize'\r\n  from /path/excon-0.45.4/lib/excon/connection.rb:387:in `new'\r\n  from /path/excon-0.45.4/lib/excon/connection.rb:387:in `socket'\r\n  from /path/excon-0.45.4/lib/excon/connection.rb:106:in `request_call'\r\n  from /path/excon-0.45.4/lib/excon/middlewares/mock.rb:47:in `request_call'\r\n  from /path/excon-0.45.4/lib/excon/middlewares/instrumentor.rb:22:in `request_call'\r\n  from /path/excon-0.45.4/lib/excon/middlewares/base.rb:15:in `request_call'\r\n  from /path/excon-0.45.4/lib/excon/middlewares/base.rb:15:in `request_call'\r\n  from /path/excon-0.45.4/lib/excon/middlewares/base.rb:15:in `request_call'\r\n  from /path/excon-0.45.4/lib/excon/connection.rb:233:in `request'\r\n  from /path/excon-0.45.4/lib/excon.rb:229:in `post'\r\n  from /path/fastlane_core-0.16.1/lib/fastlane_core/update_checker.rb:69:in `finished_running'\r\n  from /path/fastlane_core-0.16.1/lib/fastlane_core/update_checker.rb:35:in `block in show_update_status'\r\n  from /path/fastlane_core-0.16.1/lib/fastlane_core/update_checker.rb:33:in `fork'\r\n  from /path/fastlane_core-0.16.1/lib/fastlane_core/update_checker.rb:33:in `show_update_status'\r\n  from /path/fastlane-1.26.0/bin/fastlane:135:in `<top (required)>'\r\n  from /Users/user/.rbenv/versions/2.2.2/bin/fastlane:23:in `load'\r\n  from /Users/user/.rbenv/versions/2.2.2/bin/fastlane:23:in `<main>'\r\n``` \r\n\r\nI've had a bit of a look around in the code and it appears to me that this is happening because `fastlane` doesn't _wait_ for the forked process that runs the `update_checked.finished_running` method to return.\r\n\r\nThe CI then kills the test shell as soon as `fastlane` returns which in turns kills all its child processes (including the one currently making a request) - hence the error.\r\n\r\nMy current workaround has been to add a sleep statement after `fastlane` is executed, but it's obviously not ideal.\r\n\r\nI'm no ruby ninja but happy to give a PR a go to fix this. The idea would be to add a `waitpid` in `update_checked.show_update_status` in order for the parent process to wait on its child.\r\n\r\n- Fastlane: `1.26.0`\r\n- Fastlane_core: `0.16.2`\r\n\r\n:clap: :clap: for Fastlane, what a time saver!"},"comment":{"url":"https://api.github.com/repos/fastlane/fastlane_core/issues/comments/140588326","html_url":"https://github.com/fastlane/fastlane_core/issues/32#issuecomment-140588326","issue_url":"https://api.github.com/repos/fastlane/fastlane_core/issues/32","id":140588326,"user":{"login":"KrauseFx","id":869950,"avatar_url":"https://avatars.githubusercontent.com/u/869950?v=3","gravatar_id":"","url":"https://api.github.com/users/KrauseFx","html_url":"https://github.com/KrauseFx","followers_url":"https://api.github.com/users/KrauseFx/followers","following_url":"https://api.github.com/users/KrauseFx/following{/other_user}","gists_url":"https://api.github.com/users/KrauseFx/gists{/gist_id}","starred_url":"https://api.github.com/users/KrauseFx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrauseFx/subscriptions","organizations_url":"https://api.github.com/users/KrauseFx/orgs","repos_url":"https://api.github.com/users/KrauseFx/repos","events_url":"https://api.github.com/users/KrauseFx/events{/privacy}","received_events_url":"https://api.github.com/users/KrauseFx/received_events","type":"User","site_admin":false},"created_at":"2015-09-16T00:40:29Z","updated_at":"2015-09-16T00:40:29Z","body":"Thanks for the detailed report. For some reason it seems like this environment doesn't support multiple threads. You can easily disable the update checks using the `FASTLANE_SKIP_UPDATE_CHECK` environment variable for now :+1: "}}