lua-users home
lua-l archive

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

It was thus said that the Great Patrick Donnelly once stated:
> On Wed, Sep 30, 2015 at 4:54 PM, Sean Conner <> wrote:
> > It was thus said that the Great Soni L. once stated:
> >> This is VERY unsafe! You're potentially breaking a sandbox by doing a
> >> sethook. And you don't reset it, either.
> >
> >   If you mean "I don't call lua_sethook(L,NULL,0,0)" then you have misread
> > the code---I do call that.  But if you mean "I don't restore the previous
> > hooks" then you're right, I don't.  When I first started this implementation
> > of the signal module, I was concerned about that.  And I tried.  And it was
> > very fragile.  I then decided to check how other signal modules handled this
> > and guess what?  NONE OF THEM RESTORE THE HOOKS!  Not even the standalone
> > Lua interpeter bothers with restoring any hooks.

  Oh!  Well ... um ... okay.  

  -spc (Eeek)