Page MenuHomePhabricator

PDFHandler should use wfShellExecWithStderr
Closed, ResolvedPublic


Marking easy, as this is probably a straightforward bug to fix.

Currently PDFHandler runs gs and convert in a pipeline (See PdfHandler::doTransform). It sticks 2>&1 on the end of the command to catch error output, however that doesn't apply to the whole pipeline, only the last command. Hence ghostscript (gs) errors are missed.

Recommended fix: remove the 2>&1, and instead of calling wfShellExec, call wfShellExecWithStderr. (This will also catch errors for other commands, like the resource limit things, so its better than using 2>&1 anyways).

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 2:42 AM
bzimport set Reference to bz59986.
Bawolff created this task.Jan 13 2014, 4:19 AM

Change 107161 had a related patch set uploaded by 01tonythomas:
Removed the 2>&1 from doTransform and replaced wfShellExec with wfShellExecWithStderr

Change 107161 merged by jenkins-bot:
Change 2>&1 in doTransform to use wfShellExecWithStderr instead

I misread the code, so this bug didn't really exist, but wfShellExecWithStderr still a good idea.

Gilles raised the priority of this task from Normal to Unbreak Now!.Dec 4 2014, 10:24 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Normal.Dec 4 2014, 11:22 AM