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 Paul Ducklin once stated:
> philanc, any chance that you could add signal() to your low-level Linux library?
> So you can set Lua functions to receive Linux signals? (Supporting fork()
> without signal() is zombie heaven.)

  It depends upon how you use fork().  If in the parent you immediately call
wait(), then you don't need to deal with signal support.  I do have a Lua
module (for 5.1 or higher) that supports *just* signals, here:

  I also have a separate module that deals with POSIX processes:

> This would make your microlibrary a replacement for luaposix for pretty
> much everything I do with it, at least :-)
> Oh, and at the risk of asking for too much, getpwnam() and getpwuid()
> would also be great because they are handy when supporting privilege drops
> to a low-powered account. These are easy to do in pure Lua by reading
> /etc/passwd, of course, so perhaps they don’t belong in a low-level
> library.

  I found that reading /etc/passwd doesn't always work---think Mac OS-X.  I
do have a Lua module that wraps Unix user accounting, but haven't released
it yet.  Hmm ... 

> Also glob() would be a handy addition to the file/directory functions but
> is probably too high level for a library like this as well.

  My POSIX filesystem module has support for glob():

  The modules were written to be fairly focused in an aspect of POSIX usage,
but not to include everything as I don't always need everything.