X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-3.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,TW_CZ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org In-Reply-To: References: <201201272150 DOT q0RLoW6A030621 AT fumar DOT sanjose DOT ibm DOT com> To: Reini Urban Cc: cygwin AT cygwin DOT com, reini DOT urban AT gmail DOT com MIME-Version: 1.0 Subject: Re: Perl system() function works sometimes. X-KeepSent: BDCA45BA:1562BC85-88257996:0006E2AF; type=4; name=$KeepSent Message-ID: From: Gary E Barnes Date: Mon, 30 Jan 2012 17:47:28 -0800 Content-Type: text/plain; charset="US-ASCII" X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12013101-7282-0000-0000-0000060CFA4B Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com I'm confused about what you are talking about. In particular the "perl within perl" part. I have a perl script. It puts together shell commands and tries to run them using the system() call. There is no perl calling perl so far as I know. The script has worked fine for about two years on three machines. Now suddenly it doesn't work on any of them. I'm hoping that someone has an idea. It may not have anything whatsoever to do with perl as such. That is just where I am seeing the problem. "There is not enough DLL space." Interesting, I wasn't aware it was a limited resource as such (modulo those inherent in 32-bit addressing). Is there a way to determine what DLL space is in use at a given moment and what program(s) are using it? When I'm running this script the machine is a completely idle as I can make it. It is running only those things I have no way to turn off, like anti-virus. Could this problem be "just" that I need to find even more things to halt before running the script? My main questions are: 1) What could possibly have changed? I mean on the computer. I don't think all of our copies of Cygwin have changed recently. So some other DLL(s) changed perhaps? Got bigger? 2) Is there some way to truly diagnose this problem? How would I go about it? I might be able to rearrange things so that I could call system with a list of strings most of the time. However simple things like this, system ("scp machine:remote.file local.file"); have started failing where they've never failed before. My "perl -e" examples were just minimal-failing-programs that I discovered while trying to diagnose the problem. The script is no longer capable of getting to the more complicated stuff such as: system ("((tar czf - ...... ; echo $? >/tmp/status) | ssh machine 'cat - > remote.file) ; exit `cat /tmp/status`'"); I don't think things like that can be turned into a list of string arguments. I really do need to invoke a subshell (or do a great deal of process piping on my own). Would it help reduce DLL space usage if I wrote the commands out to a file and ran the file as a shell script underneath Perl? Gary On Mon, Jan 30, 2012 at 11:45 AM, Gary E Barnes wrote: > I have tried perlrebase and also rebaseall. I tried deleting cygwin from > the machine and reinstalling from scratch. > None of that fixes the problem. If it is some sort of rebase problem then > the usual tools don't fix it. > > And from what you said about calling execve when there are no interesting > shell redirections, it would appear > that perl calling system() simply doesn't work at all for some reason. Yes, it failed with a rebaseall-related fork failure because you used system with the system sh-wrapper. If you call it as list you wouldn't see this error. Yes, Calling perl within perl within perl will lead to memory conflicts. This a known problem we will have to live for a while unfortunately. There's not enough DLL space. Even less the more apps are loaded. Yes, this is fragile. That's why I recommended not to use system with strings. -- Reini Urban http://cpanel.net/ http://www.perl-compiler.org/ -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple