{"action":"created","issue":{"url":"https://api.github.com/repos/ipfs/go-ipfs/issues/1196","labels_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/1196/labels{/name}","comments_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/1196/comments","events_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/1196/events","html_url":"https://github.com/ipfs/go-ipfs/issues/1196","id":73004386,"number":1196,"title":"Can't launch a command line process from Qt","user":{"login":"MichaelMure","id":294669,"avatar_url":"https://avatars.githubusercontent.com/u/294669?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelMure","html_url":"https://github.com/MichaelMure","followers_url":"https://api.github.com/users/MichaelMure/followers","following_url":"https://api.github.com/users/MichaelMure/following{/other_user}","gists_url":"https://api.github.com/users/MichaelMure/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelMure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelMure/subscriptions","organizations_url":"https://api.github.com/users/MichaelMure/orgs","repos_url":"https://api.github.com/users/MichaelMure/repos","events_url":"https://api.github.com/users/MichaelMure/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelMure/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-04T12:16:00Z","updated_at":"2015-05-04T22:52:08Z","closed_at":null,"body":"When launched from Qt with a QProcess, the command line tool wrongly detect an extra arguments and output the help text instead of running the command.\r\n\r\n> Error: Expected 0 arguments, got 1: []\r\n\r\nHere is the code used to launch the process: https://github.com/MichaelMure/Arbore-qt/blob/d9d755db95447bc9b618b5d141402dcefc37cde9/src/ipfs/ipfs.cpp#L75-L78\r\n\r\nUsing strace, the syscall seems to be the same when launching from Qt and when using the command line:\r\n\r\nfrom Qt\r\n\r\n    execve(\"/home/michael/go/bin/ipfs\", [\"ipfs\", \"daemon\", \"--init\"], [/* 47 vars */]) = 0 `\r\n\r\nfrom bash\r\n\r\n    execve(\"/home/michael/go/bin/ipfs\", [\"ipfs\", \"daemon\", \"--init\"], [/* 46 vars */]) = 0\r\n\r\nThe problem seems to be this line: https://github.com/ipfs/go-ipfs/blob/29c6a53e435a9ca71aaac50daa3078b531582c2e/commands/cli/parse.go#L225\r\n\r\nWhen commenting this line, the launch works as expected from Qt.\r\n"},"comment":{"url":"https://api.github.com/repos/ipfs/go-ipfs/issues/comments/98879278","html_url":"https://github.com/ipfs/go-ipfs/issues/1196#issuecomment-98879278","issue_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/1196","id":98879278,"user":{"login":"jbenet","id":138401,"avatar_url":"https://avatars.githubusercontent.com/u/138401?v=3","gravatar_id":"","url":"https://api.github.com/users/jbenet","html_url":"https://github.com/jbenet","followers_url":"https://api.github.com/users/jbenet/followers","following_url":"https://api.github.com/users/jbenet/following{/other_user}","gists_url":"https://api.github.com/users/jbenet/gists{/gist_id}","starred_url":"https://api.github.com/users/jbenet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbenet/subscriptions","organizations_url":"https://api.github.com/users/jbenet/orgs","repos_url":"https://api.github.com/users/jbenet/repos","events_url":"https://api.github.com/users/jbenet/events{/privacy}","received_events_url":"https://api.github.com/users/jbenet/received_events","type":"User","site_admin":false},"created_at":"2015-05-04T22:52:08Z","updated_at":"2015-05-04T22:52:08Z","body":"#1193 is now merged.\r\n\r\n> decided the best way forward was to split up the argument types into 'file arg' and a new 'stream arg' which is for stdin. \r\n\r\nsgtm. semantically, cmds like \"ipfs add\" can check first for file args, and otherwise default to stream?"}}