{"action":"created","issue":{"url":"https://api.github.com/repos/Unitech/pm2/issues/2333","repository_url":"https://api.github.com/repos/Unitech/pm2","labels_url":"https://api.github.com/repos/Unitech/pm2/issues/2333/labels{/name}","comments_url":"https://api.github.com/repos/Unitech/pm2/issues/2333/comments","events_url":"https://api.github.com/repos/Unitech/pm2/issues/2333/events","html_url":"https://github.com/Unitech/pm2/issues/2333","id":171344895,"number":2333,"title":"Pm2 reload doesn't send SIGINT signal on cluster mode","user":{"login":"markmenox","id":14951297,"avatar_url":"https://avatars.githubusercontent.com/u/14951297?v=3","gravatar_id":"","url":"https://api.github.com/users/markmenox","html_url":"https://github.com/markmenox","followers_url":"https://api.github.com/users/markmenox/followers","following_url":"https://api.github.com/users/markmenox/following{/other_user}","gists_url":"https://api.github.com/users/markmenox/gists{/gist_id}","starred_url":"https://api.github.com/users/markmenox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markmenox/subscriptions","organizations_url":"https://api.github.com/users/markmenox/orgs","repos_url":"https://api.github.com/users/markmenox/repos","events_url":"https://api.github.com/users/markmenox/events{/privacy}","received_events_url":"https://api.github.com/users/markmenox/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Unitech/pm2/labels/bug","name":"bug","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-16T07:43:32Z","updated_at":"2016-08-16T16:50:56Z","closed_at":null,"body":"If reporting a bug, please use the following template.\r\n\r\n#### Expected behaviour\r\nWhen using the command:\r\npm2 reload idOfPm2Process\r\n\r\non a cluster of pm2 processes, pm2 should send a SIGINT signal to the process that we can catch in a listener as:\r\nprocess.on('SIGINT', function() {\r\nconsole.log('SIGINT signal catched')\r\n});\r\n...\r\n\r\n#### Actual behaviour\r\nIt seems no signal is sent to the process because no log message is sent to the output/console.\r\nIf i do the same thing on a process in fork mode it works perfecrly\r\n...\r\n\r\n#### Steps to reproduce\r\n\r\n...\r\n\r\n#### Software versions used\r\n```\r\nOS         :\r\nnode.js    :5.12.0\r\nPM2        :1.1.3\r\n```\r\n\r\n#### PM2 Log output\r\n\r\nUse the command: `tail --lines 50 ~/.pm2/pm2.log`\r\n\r\n```\r\n...\r\n```\r\n\r\ncf CONTRIBUTING.md for more informations\r\n"},"comment":{"url":"https://api.github.com/repos/Unitech/pm2/issues/comments/240164294","html_url":"https://github.com/Unitech/pm2/issues/2333#issuecomment-240164294","issue_url":"https://api.github.com/repos/Unitech/pm2/issues/2333","id":240164294,"user":{"login":"Unitech","id":757747,"avatar_url":"https://avatars.githubusercontent.com/u/757747?v=3","gravatar_id":"","url":"https://api.github.com/users/Unitech","html_url":"https://github.com/Unitech","followers_url":"https://api.github.com/users/Unitech/followers","following_url":"https://api.github.com/users/Unitech/following{/other_user}","gists_url":"https://api.github.com/users/Unitech/gists{/gist_id}","starred_url":"https://api.github.com/users/Unitech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Unitech/subscriptions","organizations_url":"https://api.github.com/users/Unitech/orgs","repos_url":"https://api.github.com/users/Unitech/repos","events_url":"https://api.github.com/users/Unitech/events{/privacy}","received_events_url":"https://api.github.com/users/Unitech/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T16:50:56Z","updated_at":"2016-08-16T16:50:56Z","body":"The way the Reload feature is implemented today does not permit to output log on exit (when inside the SIGINT callback).\r\nIt's due to the nature of how the Reload mechanism is implemented, when a Reload happens, we will disconnect the process (to stop accepting new connections) that in the same time stops the IPC channel between PM2 and the application. So we cannot catch that messages once process is disconnected.\r\n\r\nThis edge-case problem (not printing logs when handling the stop procedure gracefully in cluster mode) will be addressed on the next PM2 version (v3-Cobra) with an Embedded"}}
{"actor":{"display_login":"Unitech"}}