Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^2: Redirect output of the system() command

by Gangabass (Vicar)
on Jul 11, 2012 at 05:24 UTC ( #981010=note: print w/replies, xml ) Need Help??

in reply to Re: Redirect output of the system() command
in thread Redirect output of the system() command

It's not a system() problem so the qx// doesn't help too. The called program (wkhtmltopdf) just eat all arguments and don't rest anything to the shell.

Replies are listed 'Best First'.
Re^3: Redirect output of the system() command
by ikegami (Pope) on Jul 11, 2012 at 06:27 UTC

    You never invoked a shell because you didn't pass a shell command to system

    You want

    system('sh' => ( '-c' => '"$@" >/dev/null 2>&1', '--', $config->{wkhtmltopdf_path}, @options, $source_file, $config->{result_filename}, ));

    This approach handles spaces and other special characters in file names and options.

      Same error as before (I'm sure wkhtmltopdf just grab all arguments): Error: Failed loading page http: (sometimes it will work just to ignore this error with --load-error-handling ignore)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://981010]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2017-10-18 06:25 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (242 votes). Check out past polls.