Re: [PATCH v2 10/41] builtin/pack-objects.c: use die_errno() and warning_errno()

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

 



Nguyễn Thái Ngọc Duy  <pclouds@xxxxxxxxx> writes:

> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
> ---

> @@ -2020,7 +2018,7 @@ static void ll_find_deltas(struct object_entry **list, unsigned list_size,
>  		ret = pthread_create(&p[i].thread, NULL,
>  				     threaded_find_deltas, &p[i]);
>  		if (ret)
> -			die("unable to create thread: %s", strerror(ret));
> +			die_errno("unable to create thread");

This deserves a mention in the log message.  pthread_create()
returns 0 on success and it returns "an error number" on error.  We
used to format that returned value with strerror().

I do not see anywhere in the updated code that copies ret back to
errno, which would mean die_errno() would use whatever happens to be
in errno, and the relationship between the returned value 'ret' and
the value that is in 'errno' at this point in the code is unclear to
me.

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