I have to run a command in the background but I want to have proper escaping for its parameter.
system("rake send_mails subject='#{params[:subject]}' 2> /dev/null 1> /dev/null &");
If I write system("rake", "send_mails", params[:subject]) then I don't have "place" for redirections and the & sign. If I don't I do not have escaping for the subject parameter.
How can I resolve this?
systemcalls? For example:system(system("rake", "send_mails", params[:subject]), "/dev/null 1> /dev/null &")system()call is executed then the outersystem()fails without executing anything:TypeError: can't convert true into String