{"action":"created","issue":{"url":"https://api.github.com/repos/Alexpux/MSYS2-packages/issues/1327","repository_url":"https://api.github.com/repos/Alexpux/MSYS2-packages","labels_url":"https://api.github.com/repos/Alexpux/MSYS2-packages/issues/1327/labels{/name}","comments_url":"https://api.github.com/repos/Alexpux/MSYS2-packages/issues/1327/comments","events_url":"https://api.github.com/repos/Alexpux/MSYS2-packages/issues/1327/events","html_url":"https://github.com/Alexpux/MSYS2-packages/issues/1327","id":336852034,"node_id":"MDU6SXNzdWUzMzY4NTIwMzQ=","number":1327,"title":"symbolic link in bash get wrong arg 0","user":{"login":"SquallATF","id":1386803,"node_id":"MDQ6VXNlcjEzODY4MDM=","avatar_url":"https://avatars0.githubusercontent.com/u/1386803?v=4","gravatar_id":"","url":"https://api.github.com/users/SquallATF","html_url":"https://github.com/SquallATF","followers_url":"https://api.github.com/users/SquallATF/followers","following_url":"https://api.github.com/users/SquallATF/following{/other_user}","gists_url":"https://api.github.com/users/SquallATF/gists{/gist_id}","starred_url":"https://api.github.com/users/SquallATF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SquallATF/subscriptions","organizations_url":"https://api.github.com/users/SquallATF/orgs","repos_url":"https://api.github.com/users/SquallATF/repos","events_url":"https://api.github.com/users/SquallATF/events{/privacy}","received_events_url":"https://api.github.com/users/SquallATF/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-29T03:37:32Z","updated_at":"2018-09-10T07:53:14Z","closed_at":null,"author_association":"NONE","body":"a simple c++ source pring arg0\r\n```cpp\r\n#include <iostream>\r\n\r\nint main(int argc, char const *argv[]) {\r\n  std::cout << \"argc: \" << argc << std::endl;\r\n  std::cout << \"argv0: \" << argv[0] << std::endl;\r\n  return 0;\r\n}\r\n```\r\nuse follown comand compile it and make a symbolic link \r\n`g++ test.cpp -o test.exe && MSYS=winsymlinks:nativestrict ln -s test.exe testlink.exe`\r\nthen run `./testlink.exe` print follow result\r\n```\r\nargc: 1\r\nargv0: E:\\Work\\cpptest\\test.exe\r\n```\r\nbut if run `testlink.exe` in cmd console will get right result\r\n```\r\nargc: 1\r\nargv0: testlink.exe\r\n```\r\nin bash the  symbolic link arg0 will replace by real file location.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Alexpux/MSYS2-packages/issues/comments/419821067","html_url":"https://github.com/Alexpux/MSYS2-packages/issues/1327#issuecomment-419821067","issue_url":"https://api.github.com/repos/Alexpux/MSYS2-packages/issues/1327","id":419821067,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTgyMTA2Nw==","user":{"login":"awson","id":1339639,"node_id":"MDQ6VXNlcjEzMzk2Mzk=","avatar_url":"https://avatars3.githubusercontent.com/u/1339639?v=4","gravatar_id":"","url":"https://api.github.com/users/awson","html_url":"https://github.com/awson","followers_url":"https://api.github.com/users/awson/followers","following_url":"https://api.github.com/users/awson/following{/other_user}","gists_url":"https://api.github.com/users/awson/gists{/gist_id}","starred_url":"https://api.github.com/users/awson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awson/subscriptions","organizations_url":"https://api.github.com/users/awson/orgs","repos_url":"https://api.github.com/users/awson/repos","events_url":"https://api.github.com/users/awson/events{/privacy}","received_events_url":"https://api.github.com/users/awson/received_events","type":"User","site_admin":false},"created_at":"2018-09-10T07:53:14Z","updated_at":"2018-09-10T07:53:14Z","author_association":"NONE","body":"Yeah, I've filed this back in #1134.\r\n\r\n(btw, Microsoft since have fixed the similar WSL problem I mentioned there).\r\n\r\nDear MSys2 maintainers, please incorporate the fix proposed!\r\n\r\nOtherwise this bugs renders MSys2 unusable in many scenarios, where the programs inspects it's own name to do things in a particular way (almost all llvm tools, various cross-compilers etc)."}}
{"actor":{"display_login":"awson"}}