RE: Mac throws "Can't fork" after forking daemon a number of time s. W hats wrong ?
Hi, I have some more information about the below mentioned problem. This does not occur on a single processor G5. On dual processor we don't have any problem either on G4 or G5. On single processor G4 we still have problems. I have run the ps -aux , top and Activity Monitor to watch the disk or memory activity. Everything looks fine. I do have enough space on my hard disk ( 2 GB empty space on hard disk, 1 GB RAM, 800 MHz processor, Panther (10.3) OS). The only difference is that with so much of RAM it goes up to 400 transactions. After that CUPS throws the error "Can't fork". Any Idea where to look in. The sample code of my cups Filter is as below. Assuming that my CUPS Filter calls pictwpstops the sample code inside my CUPS Filter is : if ((pid = fork()) == 0) { execlp("pictwpstops", printer, argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], NULL); return (errno); } if (pid < 0) { return (-1); } // Now wait for the filter to complete... if (wait(&status) < 0) { return (-1); } Thanks, Sanjay Mishra -----Original Message----- From: darwin-kernel-admin@lists.apple.com [mailto:darwin-kernel-admin@lists.apple.com]On Behalf Of Sanjay Mishra Sent: Wednesday, July 07, 2004 4:09 PM To: darwin-kernel@lists.apple.com Subject: Mac throws "Can't fork" after forking daemon a number of times. W hats wrong ? Hi, I have written a CUPS filter on Mac (Panther) and it is working fine on dual processor machines but on single processor Mac the OS throws an error "Can't fork" after around 80 transactions. Only when I am using my filter this message is thrown.I am not doing much in my filter.I just pass all the arguments to it to one of the existing filters using execlp() and call wait() as the last function in the filter. My application has many parts. One of them process the HTTP request. The other is the CUPS filter. The third which converts the document requested in the PDF format. Hence the sequence is that when the application receives the HTTP request for sending a file across it gets the file from a predefined location and converts it into PDF format (during this the CUPS filter gets called by the OS) and is sent across the network to the client. After around 80 transactions and that too only on the single processor Mac machines it throws the error "can't fork". What could be going wrong? Where I should start looking into ? I looked at the number of files my application opens and it is closing all of them at the proper place. Are there any tool that can help me out. Where ever I am forking I made sure that it does not hang and closes properly. I tested them.No error is thrown if I am running the application on dual processor system. Regards, Sanjay Mishra _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored. _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.
participants (1)
-
Sanjay Mishra