{"action":"created","issue":{"url":"https://api.github.com/repos/SambaEdu/se3-clients-linux/issues/1","repository_url":"https://api.github.com/repos/SambaEdu/se3-clients-linux","labels_url":"https://api.github.com/repos/SambaEdu/se3-clients-linux/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/SambaEdu/se3-clients-linux/issues/1/comments","events_url":"https://api.github.com/repos/SambaEdu/se3-clients-linux/issues/1/events","html_url":"https://github.com/SambaEdu/se3-clients-linux/pull/1","id":162276225,"number":1,"title":"Update sauve_se3.sh","user":{"login":"efflerp","id":20140101,"avatar_url":"https://avatars.githubusercontent.com/u/20140101?v=3","gravatar_id":"","url":"https://api.github.com/users/efflerp","html_url":"https://github.com/efflerp","followers_url":"https://api.github.com/users/efflerp/followers","following_url":"https://api.github.com/users/efflerp/following{/other_user}","gists_url":"https://api.github.com/users/efflerp/gists{/gist_id}","starred_url":"https://api.github.com/users/efflerp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/efflerp/subscriptions","organizations_url":"https://api.github.com/users/efflerp/orgs","repos_url":"https://api.github.com/users/efflerp/repos","events_url":"https://api.github.com/users/efflerp/events{/privacy}","received_events_url":"https://api.github.com/users/efflerp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-06-25T11:06:39Z","updated_at":"2016-06-25T23:05:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/SambaEdu/se3-clients-linux/pulls/1","html_url":"https://github.com/SambaEdu/se3-clients-linux/pull/1","diff_url":"https://github.com/SambaEdu/se3-clients-linux/pull/1.diff","patch_url":"https://github.com/SambaEdu/se3-clients-linux/pull/1.patch"},"body":"Erreur dans la fonction tester_script_actif()"},"comment":{"url":"https://api.github.com/repos/SambaEdu/se3-clients-linux/issues/comments/228574962","html_url":"https://github.com/SambaEdu/se3-clients-linux/pull/1#issuecomment-228574962","issue_url":"https://api.github.com/repos/SambaEdu/se3-clients-linux/issues/1","id":228574962,"user":{"login":"flaf","id":3391748,"avatar_url":"https://avatars.githubusercontent.com/u/3391748?v=3","gravatar_id":"","url":"https://api.github.com/users/flaf","html_url":"https://github.com/flaf","followers_url":"https://api.github.com/users/flaf/followers","following_url":"https://api.github.com/users/flaf/following{/other_user}","gists_url":"https://api.github.com/users/flaf/gists{/gist_id}","starred_url":"https://api.github.com/users/flaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flaf/subscriptions","organizations_url":"https://api.github.com/users/flaf/orgs","repos_url":"https://api.github.com/users/flaf/repos","events_url":"https://api.github.com/users/flaf/events{/privacy}","received_events_url":"https://api.github.com/users/flaf/received_events","type":"User","site_admin":false},"created_at":"2016-06-25T23:05:19Z","updated_at":"2016-06-25T23:05:19Z","body":"> Si je comprends bien, au début du script, on teste si le fichier pid existe. s'il n'existe pas, on le crée et on y écrit le pid du script\r\n\r\nOui, ta formulation peu laisser penser que la création et le remplissage sont 2 étapes distinctes. Il vaut mieux que ce soit atomique avec simplement `echo $$ > /var/run/sauve-se3.pid`\r\n\r\n> s'il existe, on le lit le pid et on regarde s'il correspond à un processus s'il correspond à un processus, on sort\r\n\r\nPerso, j'aurais tendance à penser que si le fichier existe déjà, c'est qu'une autre instance est (potentiellement) en cours, il faut donc juste stopper le script et ne rien faire d'autre àmha.\r\n\r\nJe pense qu'il ne faut rien faire si le fichier existe déjà, peu importe le pid qu'il contient. Charge à l'admin d'étudier la question lui-même. En tout cas, perso, c'est comme ça que je ferais."}}
{"actor":{"display_login":"flaf"}}