Re: [PATCH v2 2/6] run-command: prepare command before forking

2017-04-13 Thread Brandon Williams
On 04/13, Jonathan Nieder wrote: > Hi, > > Brandon Williams wrote: > > > In order to avoid allocation between 'fork()' and 'exec()' the argv > > array used in the exec call is prepared prior to forking the process. > > nit: s/(the argv array.*) is prepared/prepare \1/ > > Git's commit messages

Re: [PATCH v2 2/6] run-command: prepare command before forking

2017-04-13 Thread Jonathan Nieder
Hi, Brandon Williams wrote: > In order to avoid allocation between 'fork()' and 'exec()' the argv > array used in the exec call is prepared prior to forking the process. nit: s/(the argv array.*) is prepared/prepare \1/ Git's commit messages are in the imperative mood, as if they are ordering t

[PATCH v2 2/6] run-command: prepare command before forking

2017-04-13 Thread Brandon Williams
In order to avoid allocation between 'fork()' and 'exec()' the argv array used in the exec call is prepared prior to forking the process. In addition to this, the function used to exec is changed from 'execvp()' to 'execv()' as the (p) variant of exec has the potential to call malloc during the pa