Re: [PATCH 5/5] run-command: add note about forking and threading

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

 



Eric Wong wrote:
> Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:

>> Why can't git use e.g. posix_spawn to avoid this?
>
> posix_spawn does not support chdir, and it seems we run non-git
> commands so no using "git -C" for those.

On the other hand, a number of the non-git commands we run are in a
shell.  At the cost of a wasted shell process, other commands can
be spawned using posix_spawn by passing the chosen directory and
command to

	sh -c 'cd "$1" && shift && exec "$@"' -

[...]
> I posted some notes about it last year:
>
>   https://public-inbox.org/git/20160629200142.GA17878@xxxxxxxxxxxxx/

Thanks for these notes.

Sincerely,
Jonathan



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