diff options
author | Brandon Williams <bmwill@google.com> | 2017-04-19 16:13:19 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-20 17:55:32 -0700 |
commit | 3967e25be11ab96ced71f16b9f082de270a518db (patch) | |
tree | c9f8232ead9d4dfa5f6667054f1ab0decb1218f7 /builtin/commit.c | |
parent | c2d3119d7bb2122a715d2adac1574514aeff7723 (diff) | |
download | git-3967e25be11ab96ced71f16b9f082de270a518db.tar.gz |
run-command: prepare command before forking
According to [1] we need to only call async-signal-safe operations between fork
and exec. Using malloc to build the argv array isn't async-signal-safe.
In order to avoid allocation between 'fork()' and 'exec()' prepare the
argv array used in the exec call prior to forking the process.
[1] http://pubs.opengroup.org/onlinepubs/009695399/functions/fork.html
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions