//bugs.freedesktop.org/show_bug.cgi?id=2254) attachment #1659
(https://bugs.freedesktop.org/attachment.cgi?id=1659): Refix for gcc4.0 build failure. It seems that the |ExecCommand()| function has no consumer and can safely be removed.
This commit is contained in:
parent
eb701e9b44
commit
c6b5a94311
|
@ -1083,34 +1083,6 @@ XpSpoolerGetServerAttributes(void)
|
||||||
return db;
|
return db;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* ExecuteCommand takes two pointers - the command to execute,
|
|
||||||
* and the "argv" style NULL-terminated vector of arguments for the command.
|
|
||||||
* We wait for the command to terminate before continuing to ensure that
|
|
||||||
* we don't delete the job file before the spooler has made a copy.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
ExecCommand(pCommand, argVector)
|
|
||||||
char *pCommand;
|
|
||||||
char **argVector;
|
|
||||||
{
|
|
||||||
pid_t childPid;
|
|
||||||
int status;
|
|
||||||
|
|
||||||
if((childPid = fork()) == 0)
|
|
||||||
{
|
|
||||||
/* return BadAlloc? */
|
|
||||||
if (execv(pCommand, argVector) == -1) {
|
|
||||||
FatalError("unable to exec '%s'", pCommand);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
(void) waitpid(childPid, &status, 0);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SendFileToCommand takes three character pointers - the file name,
|
* SendFileToCommand takes three character pointers - the file name,
|
||||||
* the command to execute,
|
* the command to execute,
|
||||||
|
|
Loading…
Reference in New Issue