From: Ken Bloom Date: 2007-12-14T09:40:01+09:00 Subject: Re: Executing Files (without shell) On Thu, 13 Dec 2007 18:27:10 -0500, thefed wrote: > Once again, a similarly themed question from me: > > Is it possible (without syscall ) to execute a file without using a > shell? Calling Kernel#system will sometimes fork a shell if you pass it something complicated like pipelines, but you can be guaranteed that it won't spawn a shell (it will execve the binary directly) if you pass the binary name and the command line arguments as separate parameters. (E.g. system("echo","hello","world") Likewise if you're running a binary that takes no parameters so there's only one string being passed as a parameter. --Ken -- Ken (Chanoch) Bloom. PhD candidate. Linguistic Cognition Laboratory. Department of Computer Science. Illinois Institute of Technology. http://www.iit.edu/~kbloom1/