Re: [PATCH v2] builtins + test helpers: use return instead of exit() in cmd_*

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

 



Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes:

> So it's really the opposite of what you're saying. If you have cleanups
> that are truly important, i.e. so important that you'd like to notify
> the user with a non-zero exit code if they fail, you *don't* want them
> in an atexit handler. That won't work.

Ah, OK.  What I had in mind was things like removing the directory
"clone" attempted to create and populate, removing temporary files,
etc.  when a function that is not marked as NORETURN calls die(), by
the atexit handler.  But you're right.  We leave a final clean-up
for normal returns (i.e. when cmd_foo() intends to return or exit
with 0) to be done to the caller that is git.::run_builtin().

Thanks.




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

  Powered by Linux