delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/12/21/15:01:29

X-Spam-Check-By: sourceware.org
Date: Wed, 21 Dec 2005 15:01:17 -0500
From: David Arnstein <arnstein AT panix DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Please try a snapshot - final push for 1.5.19
Message-ID: <20051221200117.GA5691@panix.com>
Reply-To: arnstein AT pobox DOT com
References: <20051221162249 DOT GA9890 AT trixie DOT casa DOT cgf DOT cx> <Pine DOT GSO DOT 4 DOT 63 DOT 0512211200200 DOT 8494 AT slinky DOT cs DOT nyu DOT edu>
Mime-Version: 1.0
In-Reply-To: <Pine.GSO.4.63.0512211200200.8494@slinky.cs.nyu.edu>
User-Agent: Mutt/1.5.10i
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Wed, Dec 21, 2005 at 12:17:09PM -0500, Igor Pechtchanski wrote:
> I've been having problems with "fork: resource unavailable" on my machine
> with the 10/03 snapshot.  The problem is only reproducible after Cygwin
> has been running for a while, under a heavy load.  I'll try to see if it
> appears under the 12/20 snapshot, but there's no guarantee I'll be able to
> reproduce it in time for the release.  I know this isn't much of a bug
> report, but this is just a heads-up.

I have been plagued by this problem for monthes now. I don't have a
solution, but here is a bash shell script that will reproduce the
problem. It is checking every file in its argument list. It is most
likely to cause the problem when presented with a long argument list.
I like to exercise it by launching it from C:\Windows as
	undupe.sh *

Here is undupe.sh:
#!/bin/bash

if [ $# -eq 0 ]
then
	echo "Usage: undupe.sh files..."
	exit 1
fi

declare -i first
declare -i n_dup
((n_dup = 0))
echo "Will process $# files..."

while [ $# -gt 1 ]
do
    left=$1
    if [ -f "$left" ]
    then
	((first = 1))
	for right in "$@"
	do
	    if [ $first -eq 1 ]
	    then
	        ((first = 0))
	    else
		if [ -f "$right" ]
		then
		    cmp -s "$left" "$right"
		    if [ $? -eq 0 ]
		    then
			echo "$right" is the same as "$left"
			((n_dup = n_dup + 1))
		    fi
		fi
	    fi
	done
    fi
    shift
done

echo "Deleted $n_dup files"

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019