{"action":"created","issue":{"url":"https://api.github.com/repos/profesorfalken/jProcesses/issues/8","repository_url":"https://api.github.com/repos/profesorfalken/jProcesses","labels_url":"https://api.github.com/repos/profesorfalken/jProcesses/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/profesorfalken/jProcesses/issues/8/comments","events_url":"https://api.github.com/repos/profesorfalken/jProcesses/issues/8/events","html_url":"https://github.com/profesorfalken/jProcesses/issues/8","id":143209071,"number":8,"title":"Mac OS X Process blocked","user":{"login":"onepiers","id":13851096,"avatar_url":"https://avatars.githubusercontent.com/u/13851096?v=3","gravatar_id":"","url":"https://api.github.com/users/onepiers","html_url":"https://github.com/onepiers","followers_url":"https://api.github.com/users/onepiers/followers","following_url":"https://api.github.com/users/onepiers/following{/other_user}","gists_url":"https://api.github.com/users/onepiers/gists{/gist_id}","starred_url":"https://api.github.com/users/onepiers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onepiers/subscriptions","organizations_url":"https://api.github.com/users/onepiers/orgs","repos_url":"https://api.github.com/users/onepiers/repos","events_url":"https://api.github.com/users/onepiers/events{/privacy}","received_events_url":"https://api.github.com/users/onepiers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-24T10:24:32Z","updated_at":"2016-05-17T10:18:06Z","closed_at":null,"body":"I experienced the weird issue that the process was kept alive when reading ps data. In a conclusion the library freezed. \r\n\r\n-- Mac OS X 10.11.2\r\nI could refactor the ProcessesUtils.java like this to get it running:\r\n\r\n \r\n```\r\nprivate static String readData(Process process) {\r\n\t\tStringBuilder commandOutput = new StringBuilder();\r\n\t\tBufferedReader processOutput = new BufferedReader(new InputStreamReader(process.getInputStream()));\r\n\r\n\t\ttry {\r\n\t\t\tString line;\r\n\t\t\twhile ((line = processOutput.readLine()) != null) {\r\n\t\t\t\tif (!line.isEmpty()) {\r\n\t\t\t\t\tcommandOutput.append(line).append(CRLF);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException ex) {\r\n\t\t\tLogger.getLogger(ProcessesUtils.class.getName()).log(Level.SEVERE, null, ex);\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (processOutput != null) {\r\n\t\t\t\t\tprocessOutput.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException ioe) {\r\n\t\t\t\tLogger.getLogger(ProcessesUtils.class.getName()).log(Level.SEVERE, null, ioe);\r\n\t\t\t}\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tprocess.waitFor();\r\n\t\t}catch (InterruptedException ex){\r\n\t\t\tLogger.getLogger(ProcessesUtils.class.getName()).log(Level.SEVERE, null, ex);\r\n\t\t}\r\n\t\treturn commandOutput.toString();\r\n\t}\r\n```"},"comment":{"url":"https://api.github.com/repos/profesorfalken/jProcesses/issues/comments/219676950","html_url":"https://github.com/profesorfalken/jProcesses/issues/8#issuecomment-219676950","issue_url":"https://api.github.com/repos/profesorfalken/jProcesses/issues/8","id":219676950,"user":{"login":"serge-nikitin","id":18189651,"avatar_url":"https://avatars.githubusercontent.com/u/18189651?v=3","gravatar_id":"","url":"https://api.github.com/users/serge-nikitin","html_url":"https://github.com/serge-nikitin","followers_url":"https://api.github.com/users/serge-nikitin/followers","following_url":"https://api.github.com/users/serge-nikitin/following{/other_user}","gists_url":"https://api.github.com/users/serge-nikitin/gists{/gist_id}","starred_url":"https://api.github.com/users/serge-nikitin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serge-nikitin/subscriptions","organizations_url":"https://api.github.com/users/serge-nikitin/orgs","repos_url":"https://api.github.com/users/serge-nikitin/repos","events_url":"https://api.github.com/users/serge-nikitin/events{/privacy}","received_events_url":"https://api.github.com/users/serge-nikitin/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T10:18:06Z","updated_at":"2016-05-17T10:18:06Z","body":"`List<ProcessInfo> processesList = JProcesses.getProcessList(); `\r\n\r\nThis code blocks in OS X. \r\nVersion 1.4 "}}