From: "Joachim Schmitz" Subject: RE: [PATCH 1/2] Support for setitimer() on platforms lacking it Date: Tue, 4 Sep 2012 19:23:55 +0200 Message-ID: <002801cd8ac2$10937480$31ba5d80$@schmitz-digital.de> References: <003301cd81e4$cd68daa0$683a8fe0$@schmitz-digital.de> <7vr4qqzsbe.fsf@alter.siamese.dyndns.org> <002201cd86ce$285841b0$7908c510$@schmitz-digital.de> <7vfw74s3oy.fsf@alter.siamese.dyndns.org> <003d01cd8827$34e90180$9ebb0480$@schmitz-digital.de> <7vpq64f935.fsf@alter.siamese.dyndns.org> <000d01cd89b6$d5ba6c30$812f4490$@schmitz-digital.de> <7v1uijexor.fsf@alter.siamese.dyndns.org> <003601cd8a0f$6a792840$3f6b78c0$@schmitz-digital.de> <7vzk55bu8s.fsf@alter.siamese.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: , "'Johannes Sixt'" To: "'Junio C Hamano'" X-From: git-owner@vger.kernel.org Tue Sep 04 19:24:21 2012 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T8wrD-0000nw-Ri for gcvg-git-2@plane.gmane.org; Tue, 04 Sep 2012 19:24:12 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757379Ab2IDRYE (ORCPT ); Tue, 4 Sep 2012 13:24:04 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:59078 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753512Ab2IDRYC (ORCPT ); Tue, 4 Sep 2012 13:24:02 -0400 Received: from DualCore (dsdf-4d0a1636.pool.mediaWays.net [77.10.22.54]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0Lxqdc-1Tco200gDc-015Lr3; Tue, 04 Sep 2012 19:24:00 +0200 In-Reply-To: <7vzk55bu8s.fsf@alter.siamese.dyndns.org> X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQIhsC26HFNXVNf5LMacgAbi0X2P9gIuBdH5AgQ1j9EAzDU6SAHd2fuOAzRbc6QCZvCE2AIPCL7WANNwrfABx6z0HpZJE2tA Content-Language: de X-Provags-ID: V02:K0:LXVNQCGq6WRoz81JHbBcq/VcSwCeontwT750Tf6GCTp kx4nzvqqwxFWS4gwabCz9A9Dzpoy26547UWxaEXSMgIpb86jQb +78JjVAdXV/I/0hfpsWw9WEJEP1sT3MjcEKVvjFWMlVZ3hxnCH qLZCYoscInhMNbrBQHebO9yjJGTfGTdN1jzwouG9Gk7U5yJLxB Om7e20KmPVFrA5cdEUu9zX53MDVLArD7eyAze7WoXM04me3QPC rtRQYQdDceOXjO/6ixFyxGU8R4ySkmW7sNpSawcwctAM0kAnvn K8E6X1gDTtOIidGjvNynWzJUMhmevqtkNAtmnELL2dep62GfZr bJOa5I+s7clwG6PnoSEG5mxptPbBiSA17Zy+LQTJGqQ11y3I6Z VpALt4NYNv9oA== Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: > From: Junio C Hamano [mailto:gitster@pobox.com] > Sent: Tuesday, September 04, 2012 6:58 PM > To: Joachim Schmitz > Cc: git@vger.kernel.org; 'Johannes Sixt' > Subject: Re: [PATCH 1/2] Support for setitimer() on platforms lacking it > > "Joachim Schmitz" writes: > > >> If you cannot re-trigger the timer, then you will see "20%" shown > >> after one second, silence for 4 seconds and then "done", for an > >> operation that takes 5 seconds. Which is not the end of the world, > >> though. It does not affect correctness. > > > > That does seem to work, if I do e.g. a "git clone" on git itself > > (being a fairly large repository), I see it updating the % values > > about once per second. > > Ehh, so somebody is re-arming the alarm(). I am not sure where, > though. > > ... thinks for a while, then a lightbulb slowly starts to glow ... > > Where are you cloning from, and does the other side of the clone > (i.e. upload-pack) also run on your tandem port? If you are cloning > from one of my public distribution points (e.g. k.org, repo.or.cz, > or github.com), then I think the progress indicator you are seeing > is coming from the other side, not generated by your local timer. I used GutHub The cloning from NonStop doesn't work at all, different story, but looks like poll isn#t working. Not poll's fault tough, but on out plaftom ssh (non-interactive) give a pipe rather than a socket and recv(...MSG_PEEK) then fails with ENOTSOCK > Only with the observation of "clone", I cannot tell if your timer is > working. You can try repacking the test repository you created by > your earlier "git clone" with "git repack -a -d -f" and see what > happens. It does update the counter too. > > OK, I'll go for that one-liner in git-compat-utils.h then > > > > #ifdef NO_SETITIMER /* poor man's setitimer() */ > > #define setitimer(w,v,o) alarm((v)->it_value.tv_sec+((v)->it_value.tv_usec>0)) > > #endif > > > > It certainly seems to work just fine for me. Bye, Jojo