RE: [PATCH 1/2] Support for setitimer() on platforms lacking it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Junio C Hamano [mailto:gitster@xxxxxxxxx]
> Sent: Tuesday, September 04, 2012 6:58 PM
> To: Joachim Schmitz
> Cc: git@xxxxxxxxxxxxxxx; 'Johannes Sixt'
> Subject: Re: [PATCH 1/2] Support for setitimer() on platforms lacking it
> 
> "Joachim Schmitz" <jojo@xxxxxxxxxxxxxxxxxx> 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]