{"action":"created","comment":{"url":"https://api.github.com/repos/jjaniec/21sh/pulls/comments/231555577","pull_request_review_id":172550994,"id":231555577,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTU1NTU3Nw==","diff_hunk":"@@ -0,0 +1,47 @@\n+/* ************************************************************************** */\n+/*                                                                            */\n+/*                                                        :::      ::::::::   */\n+/*   debug_jobs.c                                       :+:      :+:    :+:   */\n+/*                                                    +:+ +:+         +:+     */\n+/*   By: jjaniec <jjaniec@student.42.fr>            +#+  +:+       +#+        */\n+/*                                                +#+#+#+#+#+   +#+           */\n+/*   Created: 2018/10/15 19:40:12 by jjaniec           #+#    #+#             */\n+/*   Updated: 2018/10/26 20:55:06 by jjaniec          ###   ########.fr       */\n+/*                                                                            */\n+/* ************************************************************************** */\n+\n+#include <forty_two_sh.h>\n+\n+static void\tdebug_job_processes(t_process *first_process, int job_count, pid_t gpid)\n+{\n+\tt_process\t\t*process_ptr;\n+\tint\t\t\t\tprocess_count;\n+\n+\tprocess_ptr = first_process;\n+\tprocess_count = 0;\n+\tif (!process_ptr)\n+\t{\n+\t\tlog_debug(\"No processes in job %d\", job_count);\n+\t\treturn ;\n+\t}\n+\twhile (process_ptr)\n+\t{\n+\t\tlog_debug(\"Job %d - gpid %zu: Running process %d : %s - pid: %zu\", \\\n+\t\t\tjob_count, (size_t)gpid, process_count++, process_ptr->cmd[0], (size_t)process_ptr->pid);\n+\t\tprocess_ptr = process_ptr->next;\n+\t}\n+}\n+\n+void\t\tdebug_jobs(t_job *jobs)\n+{\n+\tt_job\t\t*job_ptr;\n+\tint\t\t\tjob_count;\n+\n+\tjob_ptr = jobs;\n+\tjob_count = 0;\n+\twhile (job_ptr)\n+\t{\n+\t\tdebug_job_processes(jobs->first_process, job_count++, job_ptr->pgid);","path":"srcs/exec/debug_jobs.c","position":44,"original_position":44,"commit_id":"073b5001bf0edbc76dbefe30c8149fc1bdf15ab6","original_commit_id":"073b5001bf0edbc76dbefe30c8149fc1bdf15ab6","user":{"login":"sonarcloud[bot]","id":39514782,"node_id":"MDM6Qm90Mzk1MTQ3ODI=","avatar_url":"https://avatars2.githubusercontent.com/in/12526?v=4","gravatar_id":"","url":"https://api.github.com/users/sonarcloud%5Bbot%5D","html_url":"https://github.com/apps/sonarcloud","followers_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/followers","following_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/repos","events_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"![Code Smell](https://sonarsource.github.io/sonar-github/code_smell.png 'Code Smell') Code Smell: Extract the assignment from this expression. ([c:AssignmentInSubExpression](https://sonarcloud.io/organizations/jjaniec-github/rules#rule_key=c%3AAssignmentInSubExpression))\n\n[See it in SonarCloud](https://sonarcloud.io/project/issues?id=jjaniec_21sh&pullRequest=46&issues=AWbu0KsnW3Y69bz5CPny&open=AWbu0KsnW3Y69bz5CPny)\n\n[ISSUE_KEY]: AWbu0KsnW3Y69bz5CPny","created_at":"2018-11-07T15:39:01Z","updated_at":"2018-11-07T15:39:03Z","html_url":"https://github.com/jjaniec/21sh/pull/46#discussion_r231555577","pull_request_url":"https://api.github.com/repos/jjaniec/21sh/pulls/46","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/jjaniec/21sh/pulls/comments/231555577"},"html":{"href":"https://github.com/jjaniec/21sh/pull/46#discussion_r231555577"},"pull_request":{"href":"https://api.github.com/repos/jjaniec/21sh/pulls/46"}}},"pull_request":{"url":"https://api.github.com/repos/jjaniec/21sh/pulls/46","id":226393211,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2MzkzMjEx","html_url":"https://github.com/jjaniec/21sh/pull/46","diff_url":"https://github.com/jjaniec/21sh/pull/46.diff","patch_url":"https://github.com/jjaniec/21sh/pull/46.patch","issue_url":"https://api.github.com/repos/jjaniec/21sh/issues/46","number":46,"state":"open","locked":false,"title":"Non waiting pipes","user":{"login":"jjaniec","id":16088893,"node_id":"MDQ6VXNlcjE2MDg4ODkz","avatar_url":"https://avatars2.githubusercontent.com/u/16088893?v=4","gravatar_id":"","url":"https://api.github.com/users/jjaniec","html_url":"https://github.com/jjaniec","followers_url":"https://api.github.com/users/jjaniec/followers","following_url":"https://api.github.com/users/jjaniec/following{/other_user}","gists_url":"https://api.github.com/users/jjaniec/gists{/gist_id}","starred_url":"https://api.github.com/users/jjaniec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjaniec/subscriptions","organizations_url":"https://api.github.com/users/jjaniec/orgs","repos_url":"https://api.github.com/users/jjaniec/repos","events_url":"https://api.github.com/users/jjaniec/events{/privacy}","received_events_url":"https://api.github.com/users/jjaniec/received_events","type":"User","site_admin":false},"body":"- Remake des pipes\r\n- Changement du moment ou on va chercher les binaires dans la table de hash pour gerer les redirections des erreurs style `command not found`\r\n- Adaptation des handlers des signaux sigint et sigchild pour gerer les pipes\r\n- Quelques fonctions qui pourraient etre utiles pour un eventuel job control","created_at":"2018-10-28T19:58:39Z","updated_at":"2018-11-07T15:39:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7e80e6871bb9ba9727f6500dd02bfde1e212012b","assignee":{"login":"jjaniec","id":16088893,"node_id":"MDQ6VXNlcjE2MDg4ODkz","avatar_url":"https://avatars2.githubusercontent.com/u/16088893?v=4","gravatar_id":"","url":"https://api.github.com/users/jjaniec","html_url":"https://github.com/jjaniec","followers_url":"https://api.github.com/users/jjaniec/followers","following_url":"https://api.github.com/users/jjaniec/following{/other_user}","gists_url":"https://api.github.com/users/jjaniec/gists{/gist_id}","starred_url":"https://api.github.com/users/jjaniec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjaniec/subscriptions","organizations_url":"https://api.github.com/users/jjaniec/orgs","repos_url":"https://api.github.com/users/jjaniec/repos","events_url":"https://api.github.com/users/jjaniec/events{/privacy}","received_events_url":"https://api.github.com/users/jjaniec/received_events","type":"User","site_admin":false},"assignees":[{"login":"jjaniec","id":16088893,"node_id":"MDQ6VXNlcjE2MDg4ODkz","avatar_url":"https://avatars2.githubusercontent.com/u/16088893?v=4","gravatar_id":"","url":"https://api.github.com/users/jjaniec","html_url":"https://github.com/jjaniec","followers_url":"https://api.github.com/users/jjaniec/followers","following_url":"https://api.github.com/users/jjaniec/following{/other_user}","gists_url":"https://api.github.com/users/jjaniec/gists{/gist_id}","starred_url":"https://api.github.com/users/jjaniec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjaniec/subscriptions","organizations_url":"https://api.github.com/users/jjaniec/orgs","repos_url":"https://api.github.com/users/jjaniec/repos","events_url":"https://api.github.com/users/jjaniec/events{/privacy}","received_events_url":"https://api.github.com/users/jjaniec/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1031952932,"node_id":"MDU6TGFiZWwxMDMxOTUyOTMy","url":"https://api.github.com/repos/jjaniec/21sh/labels/Bug%20Fix","name":"Bug Fix","color":"c2e0c6","default":false},{"id":934078151,"node_id":"MDU6TGFiZWw5MzQwNzgxNTE=","url":"https://api.github.com/repos/jjaniec/21sh/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/jjaniec/21sh/pulls/46/commits","review_comments_url":"https://api.github.com/repos/jjaniec/21sh/pulls/46/comments","review_comment_url":"https://api.github.com/repos/jjaniec/21sh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jjaniec/21sh/issues/46/comments","statuses_url":"https://api.github.com/repos/jjaniec/21sh/statuses/073b5001bf0edbc76dbefe30c8149fc1bdf15ab6","head":{"label":"jjaniec:non_waiting_pipes","ref":"non_waiting_pipes","sha":"073b5001bf0edbc76dbefe30c8149fc1bdf15ab6","user":{"login":"jjaniec","id":16088893,"node_id":"MDQ6VXNlcjE2MDg4ODkz","avatar_url":"https://avatars2.githubusercontent.com/u/16088893?v=4","gravatar_id":"","url":"https://api.github.com/users/jjaniec","html_url":"https://github.com/jjaniec","followers_url":"https://api.github.com/users/jjaniec/followers","following_url":"https://api.github.com/users/jjaniec/following{/other_user}","gists_url":"https://api.github.com/users/jjaniec/gists{/gist_id}","starred_url":"https://api.github.com/users/jjaniec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjaniec/subscriptions","organizations_url":"https://api.github.com/users/jjaniec/orgs","repos_url":"https://api.github.com/users/jjaniec/repos","events_url":"https://api.github.com/users/jjaniec/events{/privacy}","received_events_url":"https://api.github.com/users/jjaniec/received_events","type":"User","site_admin":false},"repo":{"id":133548605,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM1NDg2MDU=","name":"21sh","full_name":"jjaniec/21sh","private":false,"owner":{"login":"jjaniec","id":16088893,"node_id":"MDQ6VXNlcjE2MDg4ODkz","avatar_url":"https://avatars2.githubusercontent.com/u/16088893?v=4","gravatar_id":"","url":"https://api.github.com/users/jjaniec","html_url":"https://github.com/jjaniec","followers_url":"https://api.github.com/users/jjaniec/followers","following_url":"https://api.github.com/users/jjaniec/following{/other_user}","gists_url":"https://api.github.com/users/jjaniec/gists{/gist_id}","starred_url":"https://api.github.com/users/jjaniec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjaniec/subscriptions","organizations_url":"https://api.github.com/users/jjaniec/orgs","repos_url":"https://api.github.com/users/jjaniec/repos","events_url":"https://api.github.com/users/jjaniec/events{/privacy}","received_events_url":"https://api.github.com/users/jjaniec/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jjaniec/21sh","description":"Our own shell - wip","fork":false,"url":"https://api.github.com/repos/jjaniec/21sh","forks_url":"https://api.github.com/repos/jjaniec/21sh/forks","keys_url":"https://api.github.com/repos/jjaniec/21sh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jjaniec/21sh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jjaniec/21sh/teams","hooks_url":"https://api.github.com/repos/jjaniec/21sh/hooks","issue_events_url":"https://api.github.com/repos/jjaniec/21sh/issues/events{/number}","events_url":"https://api.github.com/repos/jjaniec/21sh/events","assignees_url":"https://api.github.com/repos/jjaniec/21sh/assignees{/user}","branches_url":"https://api.github.com/repos/jjaniec/21sh/branches{/branch}","tags_url":"https://api.github.com/repos/jjaniec/21sh/tags","blobs_url":"https://api.github.com/repos/jjaniec/21sh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jjaniec/21sh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jjaniec/21sh/git/refs{/sha}","trees_url":"https://api.github.com/repos/jjaniec/21sh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jjaniec/21sh/statuses/{sha}","languages_url":"https://api.github.com/repos/jjaniec/21sh/languages","stargazers_url":"https://api.github.com/repos/jjaniec/21sh/stargazers","contributors_url":"https://api.github.com/repos/jjaniec/21sh/contributors","subscribers_url":"https://api.github.com/repos/jjaniec/21sh/subscribers","subscription_url":"https://api.github.com/repos/jjaniec/21sh/subscription","commits_url":"https://api.github.com/repos/jjaniec/21sh/commits{/sha}","git_commits_url":"https://api.github.com/repos/jjaniec/21sh/git/commits{/sha}","comments_url":"https://api.github.com/repos/jjaniec/21sh/comments{/number}","issue_comment_url":"https://api.github.com/repos/jjaniec/21sh/issues/comments{/number}","contents_url":"https://api.github.com/repos/jjaniec/21sh/contents/{+path}","compare_url":"https://api.github.com/repos/jjaniec/21sh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jjaniec/21sh/merges","archive_url":"https://api.github.com/repos/jjaniec/21sh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jjaniec/21sh/downloads","issues_url":"https://api.github.com/repos/jjaniec/21sh/issues{/number}","pulls_url":"https://api.github.com/repos/jjaniec/21sh/pulls{/number}","milestones_url":"https://api.github.com/repos/jjaniec/21sh/milestones{/number}","notifications_url":"https://api.github.com/repos/jjaniec/21sh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jjaniec/21sh/labels{/name}","releases_url":"https://api.github.com/repos/jjaniec/21sh/releases{/id}","deployments_url":"https://api.github.com/repos/jjaniec/21sh/deployments","created_at":"2018-05-15T17:10:47Z","updated_at":"2018-10-28T17:20:41Z","pushed_at":"2018-11-07T15:36:54Z","git_url":"git://github.com/jjaniec/21sh.git","ssh_url":"git@github.com:jjaniec/21sh.git","clone_url":"https://github.com/jjaniec/21sh.git","svn_url":"https://github.com/jjaniec/21sh","homepage":"","size":2954,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":1,"open_issues":2,"watchers":3,"default_branch":"develop"}},"base":{"label":"jjaniec:develop","ref":"develop","sha":"820c7a6faae8253e96f61cb743ec322b427f8771","user":{"login":"jjaniec","id":16088893,"node_id":"MDQ6VXNlcjE2MDg4ODkz","avatar_url":"https://avatars2.githubusercontent.com/u/16088893?v=4","gravatar_id":"","url":"https://api.github.com/users/jjaniec","html_url":"https://github.com/jjaniec","followers_url":"https://api.github.com/users/jjaniec/followers","following_url":"https://api.github.com/users/jjaniec/following{/other_user}","gists_url":"https://api.github.com/users/jjaniec/gists{/gist_id}","starred_url":"https://api.github.com/users/jjaniec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjaniec/subscriptions","organizations_url":"https://api.github.com/users/jjaniec/orgs","repos_url":"https://api.github.com/users/jjaniec/repos","events_url":"https://api.github.com/users/jjaniec/events{/privacy}","received_events_url":"https://api.github.com/users/jjaniec/received_events","type":"User","site_admin":false},"repo":{"id":133548605,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM1NDg2MDU=","name":"21sh","full_name":"jjaniec/21sh","private":false,"owner":{"login":"jjaniec","id":16088893,"node_id":"MDQ6VXNlcjE2MDg4ODkz","avatar_url":"https://avatars2.githubusercontent.com/u/16088893?v=4","gravatar_id":"","url":"https://api.github.com/users/jjaniec","html_url":"https://github.com/jjaniec","followers_url":"https://api.github.com/users/jjaniec/followers","following_url":"https://api.github.com/users/jjaniec/following{/other_user}","gists_url":"https://api.github.com/users/jjaniec/gists{/gist_id}","starred_url":"https://api.github.com/users/jjaniec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjaniec/subscriptions","organizations_url":"https://api.github.com/users/jjaniec/orgs","repos_url":"https://api.github.com/users/jjaniec/repos","events_url":"https://api.github.com/users/jjaniec/events{/privacy}","received_events_url":"https://api.github.com/users/jjaniec/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jjaniec/21sh","description":"Our own shell - wip","fork":false,"url":"https://api.github.com/repos/jjaniec/21sh","forks_url":"https://api.github.com/repos/jjaniec/21sh/forks","keys_url":"https://api.github.com/repos/jjaniec/21sh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jjaniec/21sh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jjaniec/21sh/teams","hooks_url":"https://api.github.com/repos/jjaniec/21sh/hooks","issue_events_url":"https://api.github.com/repos/jjaniec/21sh/issues/events{/number}","events_url":"https://api.github.com/repos/jjaniec/21sh/events","assignees_url":"https://api.github.com/repos/jjaniec/21sh/assignees{/user}","branches_url":"https://api.github.com/repos/jjaniec/21sh/branches{/branch}","tags_url":"https://api.github.com/repos/jjaniec/21sh/tags","blobs_url":"https://api.github.com/repos/jjaniec/21sh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jjaniec/21sh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jjaniec/21sh/git/refs{/sha}","trees_url":"https://api.github.com/repos/jjaniec/21sh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jjaniec/21sh/statuses/{sha}","languages_url":"https://api.github.com/repos/jjaniec/21sh/languages","stargazers_url":"https://api.github.com/repos/jjaniec/21sh/stargazers","contributors_url":"https://api.github.com/repos/jjaniec/21sh/contributors","subscribers_url":"https://api.github.com/repos/jjaniec/21sh/subscribers","subscription_url":"https://api.github.com/repos/jjaniec/21sh/subscription","commits_url":"https://api.github.com/repos/jjaniec/21sh/commits{/sha}","git_commits_url":"https://api.github.com/repos/jjaniec/21sh/git/commits{/sha}","comments_url":"https://api.github.com/repos/jjaniec/21sh/comments{/number}","issue_comment_url":"https://api.github.com/repos/jjaniec/21sh/issues/comments{/number}","contents_url":"https://api.github.com/repos/jjaniec/21sh/contents/{+path}","compare_url":"https://api.github.com/repos/jjaniec/21sh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jjaniec/21sh/merges","archive_url":"https://api.github.com/repos/jjaniec/21sh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jjaniec/21sh/downloads","issues_url":"https://api.github.com/repos/jjaniec/21sh/issues{/number}","pulls_url":"https://api.github.com/repos/jjaniec/21sh/pulls{/number}","milestones_url":"https://api.github.com/repos/jjaniec/21sh/milestones{/number}","notifications_url":"https://api.github.com/repos/jjaniec/21sh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jjaniec/21sh/labels{/name}","releases_url":"https://api.github.com/repos/jjaniec/21sh/releases{/id}","deployments_url":"https://api.github.com/repos/jjaniec/21sh/deployments","created_at":"2018-05-15T17:10:47Z","updated_at":"2018-10-28T17:20:41Z","pushed_at":"2018-11-07T15:36:54Z","git_url":"git://github.com/jjaniec/21sh.git","ssh_url":"git@github.com:jjaniec/21sh.git","clone_url":"https://github.com/jjaniec/21sh.git","svn_url":"https://github.com/jjaniec/21sh","homepage":"","size":2954,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":1,"open_issues":2,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/jjaniec/21sh/pulls/46"},"html":{"href":"https://github.com/jjaniec/21sh/pull/46"},"issue":{"href":"https://api.github.com/repos/jjaniec/21sh/issues/46"},"comments":{"href":"https://api.github.com/repos/jjaniec/21sh/issues/46/comments"},"review_comments":{"href":"https://api.github.com/repos/jjaniec/21sh/pulls/46/comments"},"review_comment":{"href":"https://api.github.com/repos/jjaniec/21sh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jjaniec/21sh/pulls/46/commits"},"statuses":{"href":"https://api.github.com/repos/jjaniec/21sh/statuses/073b5001bf0edbc76dbefe30c8149fc1bdf15ab6"}},"author_association":"OWNER"}}
{"actor":{"display_login":"sonarcloud"}}