[Rd] bitmap() doesn't finish with file in Windows (PR#7224)

From: <t.short_at_epri-peac.com>
Date: Tue 14 Sep 2004 - 04:42:59 EST

Full_Name: Tom Short
Version: 1.9.0
OS: Win2000
Submission from: (NULL) (

POSSIBLE WISHLIST, POSSIBLE BUG: The following code works on Debian, but fails on Windows 2000 with 'Error in file("test.png", "r") : unable to open connection':

x = file("test.png","r")

The problem is that when bitmap uses ghostscript to convert the PS file to a PNG, the postscript drive doesn't wait for ghostscript to finish (under Windows). In the Linux version, the postscript driver does wait for the printing command to finish. Compare the following lines of devPS.c that actually call the "cmd":

#ifdef Unix

            err = R_system(buff);
#ifdef Win32

            err = runcmd(buff, 0, 0, NULL);

RECOMMENDATION: Change runcmd(buff, 0, 0, NULL) to runcmd(buff, 1, 0, NULL) in devPS.c to make the driver wait for the command to finish.

R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue Sep 14 04:47:21 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 09:00:16 EST