{"action":"created","issue":{"url":"https://api.github.com/repos/swift-lang/swift-t/issues/13","labels_url":"https://api.github.com/repos/swift-lang/swift-t/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/swift-lang/swift-t/issues/13/comments","events_url":"https://api.github.com/repos/swift-lang/swift-t/issues/13/events","html_url":"https://github.com/swift-lang/swift-t/issues/13","id":73121812,"number":13,"title":"Various tokenization and quoting bugs in turbine::sync_exec","user":{"login":"timarmstrong","id":1156011,"avatar_url":"https://avatars.githubusercontent.com/u/1156011?v=3","gravatar_id":"","url":"https://api.github.com/users/timarmstrong","html_url":"https://github.com/timarmstrong","followers_url":"https://api.github.com/users/timarmstrong/followers","following_url":"https://api.github.com/users/timarmstrong/following{/other_user}","gists_url":"https://api.github.com/users/timarmstrong/gists{/gist_id}","starred_url":"https://api.github.com/users/timarmstrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timarmstrong/subscriptions","organizations_url":"https://api.github.com/users/timarmstrong/orgs","repos_url":"https://api.github.com/users/timarmstrong/repos","events_url":"https://api.github.com/users/timarmstrong/events{/privacy}","received_events_url":"https://api.github.com/users/timarmstrong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-04T20:33:54Z","updated_at":"2015-05-04T21:13:42Z","closed_at":null,"body":"The basic cause is that we're calling out to system, which requires taking our nicely tokenized args, munging them into a single string, and hoping that system will re-tokenize the string back into the original form.  This is possible if you escape the string correctly (turbine::sync_exec doesn't).\r\n\r\nTest 6392 is one example where this breaks.  There will be others.\r\n\r\nWe could avoid that whole mess if we just call execvp() or similar with our tokenized args instead  http://pubs.opengroup.org/onlinepubs/009695399/functions/exec.html"},"comment":{"url":"https://api.github.com/repos/swift-lang/swift-t/issues/comments/98851281","html_url":"https://github.com/swift-lang/swift-t/issues/13#issuecomment-98851281","issue_url":"https://api.github.com/repos/swift-lang/swift-t/issues/13","id":98851281,"user":{"login":"timarmstrong","id":1156011,"avatar_url":"https://avatars.githubusercontent.com/u/1156011?v=3","gravatar_id":"","url":"https://api.github.com/users/timarmstrong","html_url":"https://github.com/timarmstrong","followers_url":"https://api.github.com/users/timarmstrong/followers","following_url":"https://api.github.com/users/timarmstrong/following{/other_user}","gists_url":"https://api.github.com/users/timarmstrong/gists{/gist_id}","starred_url":"https://api.github.com/users/timarmstrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timarmstrong/subscriptions","organizations_url":"https://api.github.com/users/timarmstrong/orgs","repos_url":"https://api.github.com/users/timarmstrong/repos","events_url":"https://api.github.com/users/timarmstrong/events{/privacy}","received_events_url":"https://api.github.com/users/timarmstrong/received_events","type":"User","site_admin":false},"created_at":"2015-05-04T21:13:42Z","updated_at":"2015-05-04T21:13:42Z","body":"I'm looking at how Tcl's exec is implemented. \r\n\r\nThere are some functions there that may be useful.  Tcl_OpenCommandChannel will create a subprocess given a set of args, and will process exec-style redirects.  ttps://www.tcl.tk/man/tcl8.6/TclLib/OpenFileChnl.htm\r\n\r\nWhat was the reason we didn't want to use exec again?  Was it some additional features that we didn't want?"}}