Re: [RFC PATCHv6 1/2] repack: rewrite the shell script in C

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

 



Am 22.08.2013 00:15, schrieb Stefan Beller:
On 08/21/2013 10:56 PM, Junio C Hamano wrote:
Stefan Beller <stefanbeller@xxxxxxxxxxxxxx> writes:
+static int delta_base_offset = 1;
+char *packdir;

Does this have to be global?

As the path is pretty obvious (get_object_directory() + "/pack"),
we could however also construct it again in the signal handler.

I would advise against doing that. The recomputation would call malloc(), which is not async-signal-safe. (It would not be the first case where we call "forbidden" functions from signal handlers, but we need not pile more on top of them.)

-- Hannes

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