Fix for http://xprint.freedesktop.org/bugzilla/show_bug.cgi?id=789 : Adding
a workaround for the issue that Xprt may hang when the CUPS spooler frontend sends messages to stdout.
This commit is contained in:
parent
c66cc2a219
commit
884908a63c
|
@ -1150,10 +1150,16 @@ SendFileToCommand(
|
||||||
if((childPid = fork()) == 0)
|
if((childPid = fork()) == 0)
|
||||||
{
|
{
|
||||||
close(pipefd[1]);
|
close(pipefd[1]);
|
||||||
|
|
||||||
|
/* Replace current stdin with input from the pipe */
|
||||||
close(0);
|
close(0);
|
||||||
dup(pipefd[0]);
|
dup(pipefd[0]);
|
||||||
close(pipefd[0]);
|
close(pipefd[0]);
|
||||||
|
|
||||||
|
/* Close current stdout and redirect it to stderr */
|
||||||
|
close(1);
|
||||||
|
dup(2);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If a user name is specified, try to set our uid to match that
|
* If a user name is specified, try to set our uid to match that
|
||||||
* user name. This is to allow e.g. a banner page to show the
|
* user name. This is to allow e.g. a banner page to show the
|
||||||
|
|
Loading…
Reference in New Issue