{"action":"closed","issue":{"url":"https://api.github.com/repos/ochinchina/supervisord/issues/74","repository_url":"https://api.github.com/repos/ochinchina/supervisord","labels_url":"https://api.github.com/repos/ochinchina/supervisord/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/ochinchina/supervisord/issues/74/comments","events_url":"https://api.github.com/repos/ochinchina/supervisord/issues/74/events","html_url":"https://github.com/ochinchina/supervisord/issues/74","id":304100800,"number":74,"title":"eventlistener uses 100% CPU while listening","user":{"login":"rwlincoln","id":36113520,"avatar_url":"https://avatars1.githubusercontent.com/u/36113520?v=4","gravatar_id":"","url":"https://api.github.com/users/rwlincoln","html_url":"https://github.com/rwlincoln","followers_url":"https://api.github.com/users/rwlincoln/followers","following_url":"https://api.github.com/users/rwlincoln/following{/other_user}","gists_url":"https://api.github.com/users/rwlincoln/gists{/gist_id}","starred_url":"https://api.github.com/users/rwlincoln/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwlincoln/subscriptions","organizations_url":"https://api.github.com/users/rwlincoln/orgs","repos_url":"https://api.github.com/users/rwlincoln/repos","events_url":"https://api.github.com/users/rwlincoln/events{/privacy}","received_events_url":"https://api.github.com/users/rwlincoln/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-10T20:11:38Z","updated_at":"2018-03-12T13:27:01Z","closed_at":"2018-03-12T13:27:01Z","author_association":"NONE","body":"When an `eventlistener` is added `supervisord` uses 100% CPU even if all programs are idle. Take for example:\r\n\r\n```ini\r\n[program:a]\r\ncommand = bash -c \"sleep 8 && exit 2\"\r\n\r\n[eventlistener:a_exit]\r\ncommand = ./event.sh\r\nevents=PROCESS_STATE_EXITED,PROCESS_STATE_FATAL\r\n```\r\n\r\nwhere `event.sh` is:\r\n\r\n```sh\r\n#!/bin/sh\r\necho READY\r\nread header\r\npkill supervisord\r\n```\r\n\r\nYou should see this using 100% CPU for 8 seconds before it exits. Removing the `eventlistener` section solves the CPU issue, but `supervisord` doesn't exit."}}
{"actor":{"display_login":"rwlincoln"}}