[cups.bugs] [HIGH] STR #3196: non-portable issues and OpenBSD fix

Michael Sweet msweet at apple.com
Fri May 15 09:58:41 PDT 2009


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

In response to truk's comments: cupsd itself is not multi-threaded on most
operating systems, however DBUS introduces threads just by linking to it,
leading to the "need to exec" issue.  A similar problem exists on Mac OS X
with CoreFoundation which is why we have the fork + exec with different
option hack.  This hack is fundamentally unsafe since we cannot be 100%
sure that argv[0] contains the path to the cupsd executable that was
executed, but we'll have to live with that issue in the absence of a
portable way to get the real executable path.

As for close+dup vs. dup2, close+dup has a long history of usage, and
breaking that would break a lot of existing code that has worked since the
dawn of UNIX.  Moreover, dup2 is not universally available, so we have to
decide whether we care about supporting old UNIX's without dup2.

Link: http://www.cups.org/str.php?L3196
Version: 1.3.10





More information about the cups-devel mailing list