delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/11/07/19:26:06

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 379583858C2D
Authentication-Results: sourceware.org;
dmarc=fail (p=none dis=none) header.from=nifty.ne.jp
Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 2A80OJZA032431
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp;
s=dec2015msa; t=1667867060;
bh=mBmOzcLp7WyW79Yq2y8ADeIVeUHcILQzd21h+ztEHp8=;
h=Date:From:To:Cc:Subject:In-Reply-To:References:From;
b=t3suaNMfLPma5RzPLBRh+0z64KyInS6JnJkVlkB9SoQI8Du1p5ddUaOYjRIzPDrzu
3kGCceMZcRos+5UMYX0eORT+ZZuZ7zUgegMhDMd9kt6nRa0W0dwd19AYmeeNJJ6KXF
5uNevc+jcD3L0lfYqhP0SeUl7xAiNgMsFZbR/sifrVjy+dBgDjpWYA6ygx1CftVGqS
lh3bF/fvyd4N0aXhRs5ohsepsa+oArr4foTGxPWm1q7LjrZddDL4h4YEWTA++1PD6W
MVzri7H7jE2cuZ8w8ZaITdpturN5w9+t9n+dSc6LSY57ML+cq6ejdtD2QtrfLPBw75
eat6znpSuytvg==
X-Nifty-SrcIP: [220.150.136.180]
Date: Tue, 8 Nov 2022 09:24:20 +0900
From: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
To: cygwin AT cygwin DOT com
Cc: Derek Pagel <Derek DOT Pagel AT infor DOT com>
Subject: Re: Cygwin commands are intermittently hanging on Windows
Message-Id: <20221108092420.7e52f3be24171e27b0215a52@nifty.ne.jp>
In-Reply-To: <CH2PR02MB60248F2E94F6AE770B509A59E53C9@CH2PR02MB6024.namprd02.prod.outlook.com>
References: <CH2PR02MB60248F2E94F6AE770B509A59E53C9 AT CH2PR02MB6024 DOT namprd02 DOT prod DOT outlook DOT com>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE,
SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On Mon, 7 Nov 2022 22:06:46 +0000
Derek Pagel wrote:
> I've printed the script below for reference:
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> use strict;
> use Cwd;
> 
> my $TESTDIR = getcwd() . "\\test<file://test>";
> my $MKDIRCMD = "mkdir test";
> my $TOUCHCMD = 'touch test.txt';
> my $CPCMD = 'cp test.txt test2.txt';
> my $MVCMD = "mv test.txt " . $TESTDIR . "\\test.txt<file://test.txt>";
> my $WHICHCMD = 'which explorer.exe';
> my $RMCMD = "rm " . $TESTDIR . "\\test.txt test2.txt<file://test.txt%20test2.txt>";
> my $count = 0;
> my $fh;
> my $LOG = open $fh, '>', 'cygwinTest.log';
> 
> if ( ! -e $TESTDIR ) {
>                 runCMD($MKDIRCMD, 0);
> }
> 
> while ($count < 10000) {
>                 print "Loop $count:\n";
>                 runCMD($TOUCHCMD, $count);
>                 runCMD($CPCMD, $count);
>                 runCMD($MVCMD, $count);
>                 runCMD($WHICHCMD, $count);
>                 runCMD($RMCMD, $count);
>                 $count++;
> }
> 
> sub runCMD {
>                 my $CMD = $_[0];
>                 my $COUNT = $_[1];
>                 my $retCode;
>                 my $startTime;
>                 my $endTime;
>                 my $totalTime;
> 
>                 $startTime = time();
>                 $CMD = "C:\\Windows\\system32\\cmd.exe /c $CMD";
>                 $retCode = system($CMD);
>                 $endTime = time();
>                 $totalTime = $endTime - $startTime;
>                 if ($totalTime > 1 ) {
>                                 print $fh "Loop #$COUNT:\n";
>                                 if ($retCode == 0) {
>                                                 print $fh "It took $totalTime seconds to run [$CMD]\n";
>                                 } else {
>                                                 print $fh "It took $totalTime seconds to unsuccesfully run [$CMD]\n";
>                                 }
>                 }
> }
> 
> close $fh;
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Which script language do you use for this script?
It looks like perl script, however, cygwin perl
cannot run this script.

-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

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

- Raw text -


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