Petr Machata <pe...@nvidia.com> writes:
> Hangbin Liu <liuhang...@gmail.com> writes: > >> +# By default, remove all netns before EXIT. >> +cleanup_all_ns() >> +{ >> + cleanup_ns $NS_LIST >> +} >> +trap cleanup_all_ns EXIT > > Hmm, OK, this is a showstopper for inclusion from forwarding/lib.sh, > because basically all users of forwarding/lib.sh use the EXIT trap. [...] > So just ignore the bit about including from forwarding/lib.sh. Actually I take this back. The cleanup should be invoked from where the init was called. I don't think the library should be auto-invoking it, the client scripts should. Whether through a trap or otherwise.