Re: [PATCH v2 2/2] gc: config option for running --auto in background
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Feb 12, 2014, 01:53 UTC
- Message-ID
- <CACsJy8CyAsA5VA-s_c7juaRyToRU+QzJsYZDvzD5ggaR6=9FOg@mail.gmail.com>
- In-Reply-To
- <CAPc5daW3VwLutU8JZu9fBbGtihw5X_bE9M31ugzqN9mEnFYNNQ@mail.gmail.com>
On Tue, Feb 11, 2014 at 2:11 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> On Mon, Feb 10, 2014 at 10:43 AM, Junio C Hamano <gitster@pobox.com> wrote: >>> If --quiet is set, we should not be printing anyway. If not, I thinkg >>> we could only print "auto packing in background.." when we actually >>> can do that, else just print the old message. It means an #ifdef >>> NO_POSIX_GOODIES here again though.. >> >> Didn't you change it not to die but return nosys or something? > > Ah, the problem is that it is too late to take back "... will do so in > the background" when you noticed that daemonize() did not succeed, so > you would need a way to see if we can daemonize() before actually > doing so if you want to give different messages. > > "int can_daemonize(void)" could be an answer that is nicer than > NO_POSIX_GOODIES, but I am not sure if it is worth it.
Or we could pass the "quiet" flag to daemonize() and let it print something in the #ifdef NO_POSIX_GOODIES part.
-- Duy