{"action":"created","issue":{"url":"https://api.github.com/repos/arun11299/cpp-subprocess/issues/20","repository_url":"https://api.github.com/repos/arun11299/cpp-subprocess","labels_url":"https://api.github.com/repos/arun11299/cpp-subprocess/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/arun11299/cpp-subprocess/issues/20/comments","events_url":"https://api.github.com/repos/arun11299/cpp-subprocess/issues/20/events","html_url":"https://github.com/arun11299/cpp-subprocess/issues/20","id":393923693,"node_id":"MDU6SXNzdWUzOTM5MjM2OTM=","number":20,"title":"is cpp-subprocess thread safe?","user":{"login":"lordadamson","id":43860544,"node_id":"MDQ6VXNlcjQzODYwNTQ0","avatar_url":"https://avatars1.githubusercontent.com/u/43860544?v=4","gravatar_id":"","url":"https://api.github.com/users/lordadamson","html_url":"https://github.com/lordadamson","followers_url":"https://api.github.com/users/lordadamson/followers","following_url":"https://api.github.com/users/lordadamson/following{/other_user}","gists_url":"https://api.github.com/users/lordadamson/gists{/gist_id}","starred_url":"https://api.github.com/users/lordadamson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lordadamson/subscriptions","organizations_url":"https://api.github.com/users/lordadamson/orgs","repos_url":"https://api.github.com/users/lordadamson/repos","events_url":"https://api.github.com/users/lordadamson/events{/privacy}","received_events_url":"https://api.github.com/users/lordadamson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-24T19:31:16Z","updated_at":"2018-12-25T12:03:51Z","closed_at":null,"author_association":"NONE","body":"Or does it provide the option of thread safety?\r\n\r\nIn my code I'm using an openmp loop where I would like to call `sp::Popen`.\r\n\r\nIt looks something like this:\r\n\r\n```c++\r\n#pragma omp parallel for\r\nfor(size_t i = 0; i < v.size(); i++)\r\n{\r\n\tauto p = Popen({\"subprocess\"}, input{PIPE});\r\n\tp.communicate(v[i].c_str(), v[i].size() + 1);\r\n}\r\n```\r\n\r\nwhere v is a `std::vector<std::string>` but it hangs randomly at the `fork()` call in [subprocess.hpp:1159](https://github.com/arun11299/cpp-subprocess/blob/master/subprocess.hpp#L1159)\r\n\r\nThanks in advance and thanks for the amazing library."},"comment":{"url":"https://api.github.com/repos/arun11299/cpp-subprocess/issues/comments/449844877","html_url":"https://github.com/arun11299/cpp-subprocess/issues/20#issuecomment-449844877","issue_url":"https://api.github.com/repos/arun11299/cpp-subprocess/issues/20","id":449844877,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTg0NDg3Nw==","user":{"login":"lordadamson","id":43860544,"node_id":"MDQ6VXNlcjQzODYwNTQ0","avatar_url":"https://avatars1.githubusercontent.com/u/43860544?v=4","gravatar_id":"","url":"https://api.github.com/users/lordadamson","html_url":"https://github.com/lordadamson","followers_url":"https://api.github.com/users/lordadamson/followers","following_url":"https://api.github.com/users/lordadamson/following{/other_user}","gists_url":"https://api.github.com/users/lordadamson/gists{/gist_id}","starred_url":"https://api.github.com/users/lordadamson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lordadamson/subscriptions","organizations_url":"https://api.github.com/users/lordadamson/orgs","repos_url":"https://api.github.com/users/lordadamson/repos","events_url":"https://api.github.com/users/lordadamson/events{/privacy}","received_events_url":"https://api.github.com/users/lordadamson/received_events","type":"User","site_admin":false},"created_at":"2018-12-25T12:03:51Z","updated_at":"2018-12-25T12:03:51Z","author_association":"NONE","body":"Merry Christmas to you too :smile: "}}
{"actor":{"display_login":"lordadamson"}}