Bug 421 - fork() within Xprt may require to flush files/sockets...
Summary: fork() within Xprt may require to flush files/sockets...
Alias: None
Product: xprint
Classification: Unclassified
Component: Server: Spooler support: Other (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: high normal
Assignee: Roland Mainz
QA Contact:
Depends on:
Reported: 2004-04-07 16:26 UTC by Roland Mainz
Modified: 2011-09-13 12:16 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Description Roland Mainz 2004-04-07 16:26:03 UTC
Looking at

The code calls |fork()| but doesn't |flush()| any files/sockets etc. before
doing that
-- snip --
 * 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);
        (void) waitpid(childPid, &status, 0);
-- snip --

I've seen some complains about problems when printing with some spoolers, the
error message on the client side was |Xlib: unexpected async reply (sequence

Is it possible that calling |fork()| may require to flush the streams/files/etc.
before calling it to prevent that the child process may flush cloned data back
to the client ?
Comment 1 Corbin Simpson 2011-09-13 12:16:14 UTC
Closing WONTFIX because nobody cares about Xprint. Reopen if you plan to address this bug.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.