Skip to content

Conversation

cj-james-mathews
Copy link

No description provided.

renatomaia and others added 30 commits November 3, 2015 23:48
- Fix to indicate disconnected connections properly.
- Support for 'network.address' objects in 'network' operations (instead of string+number addresses).
- Support 'a1 == a2' to compare address contents.
Fix the way socket IDs are obtained to be used in 'tostring'.
- New 'lnetaux' C lib for manipulation of sockets and addresses created in Lua.
…' boilerplate.

- Better I/O error report (all possible errors are documented).
- Socket support documentation.
- New features (tests missing!)
	- Receive flags (peek and waitall)
	- Create sockets for different addressing domains (family)
	- DNS support to resolve names to addresses (still a draft)
- Some initial tests for DSN support.
- Some renaming on the network library driver API.
- Adding support to disable library driver for the time lib.
- Search flag support for 'network.resolve'.
- Some IPv6 support in 'network.address'.
- Support for raising error while accessing address object fields.
- Support for raising custom errors in library driver initialization.
- Fixes in the IPv6 support.
- Some renaming and style changes in the code.
  changed after a connection socket is connected.
- Fix to avoid 'socket:connect' fail after a previous non-blocking connect.
- Fix some distributed tests implementations to deal with eventual
  situations like some package not being completely sent in one single
  try.
- Some fixes in the documentation.
… finally connected in non-blocking mode (FreeBSD indicates EISCONN instead of succeding as in Linux) instead of raising error 'invalid'.
- Fix memory leak problems when Lua allocation memory errors were raised.
- Single-threaded implemetation of a chlid process manager. (missing a pthread version)
- A unit test for the Process Table used by the child process manager.
…he illegal char '='.

- Standardize error messages for operations 'process.*'.
- Allow standard files to be used as new standard files in operation 'process.create'.
- 'process.exitval' returns error message "aborted" for terminated processes.
… how to make a pipe library tell the process library how to convert its Lua pipe into a value that can be used as a STDIN/OUT/ERR (process stream).

- Support for win32 is not being maintained. Delayed for a future effort.
Move all header files to a "namespace folder" to make it easier to embed in applications.
Better library organization.
…m signal handler. Only realloc on insertion, just like Lua tables.
- Avoid closing sources that are inserted in a watcher
Renato Maia and others added 30 commits February 13, 2018 01:52
…bytes, and drop support to receive bytes as a string.
`waitpid(-1)` can reap processes started by other libraries, including
Lua's `io.popen()`, causing them to fail to get the exit status. So
don't do that: call `waitpid()` only on PIDs started through the
`process.create` defined here, which are already tracked in `proctab`.
Other libraries may have installed signal handlers for `SIGCHLD`. We
should call them as well, instead of simply overwriting all handlers
with our own.

The constant `sigaction()` calls are still pretty risky, as we race with
anything else that wants to set signal handlers, but at least now we try
to do things more correctly.
procmgr: Only `waitpid()` on our processes and chain to previous `SIGCHLD` handler
Not all code can cope with EINTR on calls to e.g. read/write properly.
In particular, Lua itself cannot. So allow them to be restarted in order
to avoid those EINTR errors.
Plugs a memory leak on closing a Lua state in which the process library
has been loaded.

Signed-off-by: Matti Niemenmaa <[email protected]>
Prevents `prev_childact` from being written to (by `sigaction`)
concurrently with it being read inside `childhandler`, potentially
leading to a wild function pointer call. This could happen with two (or
more) ill-timed `losiP_unlockprocmgr` calls during execution of
`childhandler`.

Also addresses relying on `sa_flags` being `0` when `SA_RESTART` was
actually wanted.
Leaving `childhandler` to only notify that reaping is required.

Prevents `proctab.table` from being concurrently reallocated by
`losiP_putproctab` while `childhandler` is iterating over it.

The new `losiP_drainchildren` exits early after doing as many as
`waitpid` calls as we've seen SIGCHLD signals, which could avoid extra
work in some cases.
If there are no more processes being tracked in `proctab` then we can
stop looping through the rest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants