Am 06.07.2013 um 11:52 schrieb Guy Rutenberg <guyrutenb...@gmail.com>:
> Hi, > > I'm going over the code of Systemcall::startscript() and I wonder why the > developers opted out to pass spaces separated arguments instead of a list of > arguments (e.g. system() vs execv() argument passing)? > > QProcess seems to support both ways to pass arguments, but passing arguments > explicitly (instead of as part of the command itself) seems to me more > reasonable and safe (less prune to bugs when doing improper quotation of > spaces etc.) > > I would be glad if someone could spare sometime and explain to me why things > work as they do. IMHO, the current state is a result of using system() call at first because of platform independency and it is never moved to the execv() style later because using QProcess is an option only. Another problem in this area is IMHO the parsing of stdin/stdout/stderr redirection. It would be better to consequently pass the file names to redirect as separate arguments and use the redirect features of QProcess. Stephan