Bug 421 - fork() within Xprt may require to flush files/sockets...
Summary: fork() within Xprt may require to flush files/sockets...
Status: RESOLVED WONTFIX
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:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
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:


Attachments

Description Roland Mainz 2004-04-07 16:26:03 UTC
Looking at
http://xprint.freedesktop.org/cgi-bin/viewcvs.cgi/*checkout*/xprint/xprint/src/xprint_main/xc/programs/Xserver/Xprint/attributes.c?content-type=text%2Fplain&rev=1.5

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);
        }
    }
    else
    {
        (void) waitpid(childPid, &status, 0);
    }
    return;
}
-- 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
0x4000)!|.

Alan:
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.