Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Jeff Lu" To: "cygwin" Subject: strange printing problem in cygwin Date: Fri, 25 Jan 2002 20:08:28 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Importance: Normal Hi, I have a c program that sends data output to different printers. Here is the code: int main() { FILE *printHandle; char contentType[] = "text/html", buffer[100]; printf("Content-Type: %s\n\n", contentType); strcpy(buffer, "This is a test\n"); printHandle = fopen("//pc0/printer0","wb"); if(printHandle) { fwrite(buffer, sizeof(char), strlen(buffer), printHandle); fclose(printHandle); } printHandle = fopen("//pc1/printer1","wb"); if(printHandle) { fwrite(buffer, sizeof(char), strlen(buffer), printHandle); fclose(printHandle); } printHandle = fopen("//pc2/printer2","wb"); if(printHandle) { fwrite(buffer, sizeof(char), strlen(buffer), printHandle); fclose(printHandle); } return(0); } pc0 is local printer pc1 & pc2 are network printers Here's the problem: Program is executed from a command line on pc0 1st execution: "This is a test" is printed to printer0 2nd execution: "This is a test" is printed to printer1 3rd execution: "This is a test" is printed to printer2 4th execution: "This is a test" is printed to printer0 5th execution: "This is a test" is printed to printer1 .. .. .. However, when the program is executed through http request (in an intranet evirnoment) 1st execution: "This is a test" is printed to both printer0 and printer1 but printer2 2nd execution on up: "This is a test" only gets printed to printer0 Seems like stdout is not getting reset. Is this a configuration issue in cygwin? What can I do to be able to print to all the printers all at once? Thanks -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/