dtrace -G uses shell to execute gcc: call("gcc -fPIC -c " + fn + " -o " + filename, shell=True) This makes directories with spaces problematic: % mkdir a\ directory % cd a\ directory % touch test.d % ../dtrace -G -s $PWD/test.d gcc: directory/test.o: No such file or directory Better way is to use python equivalent of execlp(3) or execvp(3).
I made it so that call passes a list of arguments so that spaces aren't a problem in: commit c0d0d86876a3763492b3f4054961e9c850e9c216 Author: Mark Wielaard <mjw@redhat.com> Date: Mon Feb 16 14:50:02 2009 +0100 PR 9850, use a list of arguments for call. But you will still have to quote things like $PWD on the command line to get them as whole arguments to python (otherwise the shell seems to split them into multiple arguments anyway). So using this now works: ../dtrace -G -s "$PWD/test.d" as does ../dtrace -G -s ../a\ directory/test.d Is this enough? I am not sure how to get the behaviour you want without quoting the $PWD variable in the shell.
Subject: Re: dtrace: Incorrect shell execution 16 лютого 2009 о 13:54 -0000 mjw at redhat dot com написав(-ла): > But you will still have to quote things like $PWD on the command line to get > them as whole arguments to python (otherwise the shell seems to split them into > multiple arguments anyway). Hmm, not my shell (zsh)... But others realy do so. > So using this now works: > ../dtrace -G -s "$PWD/test.d" > as does > ../dtrace -G -s ../a\ directory/test.d > > Is this enough? Yep, this is enough.
It is enough! :)