- /* All of this function is just to work around the fact that
- * there is no way to get the umask without changing it.
- *
- * We can't just change-and-reset the umask because that would
- * lead to a race condition if another thread tried to change
- * the umask in between the getting and the setting of the umask.
- * So we have to do the whole thing in a child process.
- */
- pid_t pid;
-
- pid = fork ();
-
- if (pid == -1)
- {
- return FALSE;
- }
- else if (pid == 0)
- {
- /* child */
- mode_t mask = umask (0666);
-
- errno = 0;
- if (fchmod (fd, 0666 & ~mask) == -1)
- _exit (errno);
- else
- _exit (0);
-
- return TRUE; /* To quiet gcc */
- }
- else
- {
- /* parent */
- int status;
-
- errno = 0;
- if (waitpid (pid, &status, 0) == -1)
- {
- return FALSE;
+ const guchar *driver;
+ const guchar *transport;
+
+ driver = gnome_print_config_get (
+ config, (const guchar *)"Settings.Engine.Backend.Driver");
+
+ transport = gnome_print_config_get (
+ config, (const guchar *)"Settings.Transport.Backend");
+
+ if (driver) {
+ if (!strcmp ((const gchar *)driver, "gnome-print-ps"))
+ return TRUE;
+ else
+ return FALSE;
+ } else if (transport) { /* these transports default to PostScript */
+ if (!strcmp ((const gchar *)transport, "CUPS"))
+ return TRUE;
+ else if (!strcmp ((const gchar *)transport, "LPD"))
+ return TRUE;