Re: [PATCH] Repack should try to prevent itself from running twice, concurrently.

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

 



Hi,

On Sun, 25 Jun 2006, Ryan Anderson wrote:

> +if [ -f $GIT_DIR/repack.lock ]
> +then
> +	echo "Existing repack job appears to be running."
> +	echo "Remove $GIT_DIR/repack.lock if this is not the case."
> +	exit 1
> +else
> +	echo $$ > $GIT_DIR/repack.lock
> +fi

It is not like it is being an atomic operation, but then, we are not going 
to call repack multiple times a second. I'd say it is sufficient.

Ciao,
Dscho

-
: 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]