Switch branches/tags
Nothing to show
Commits on Nov 19, 2013
Commits on Apr 6, 2013
Commits on Mar 29, 2013
  1. Avoid race condition in umask/0

    msantos committed Mar 29, 2013
    Between successive calls to umask/1, the process may be swapped out. If
    another process queries the umask, beam may end up in an inconsistent
    state. The issue is that querying the umask is destructive: it's done by
    setting the umask to 0, then re-setting it back to the original umask.
    A better fix would be to put the logic in the NIF where the sequence of
    events is atomic. However, it's more fun to experiment with putting the
    lock in the Erlang code.
    There are 2 potential problems:
    1. If another process registers 'perc_umask', umask/0 will spin forever.
    2. If something (another NIF, ...) changes the umask between calls,
       umask/0 will crash, releasing the lock. This will kill the calling
       process which may not be expected.
    To provoke the race condition:
    stress(N) ->
        [ spawn(fun() -> set_mask() end) || _ <- lists:seq(1,N) ].
    set_mask() ->
        false = 0 == perc:umask(),
  2. Use umask/0 in test

    msantos committed Mar 29, 2013
Commits on Mar 28, 2013
  1. Update TODO list

    msantos committed Mar 28, 2013
  2. Add test for umask

    msantos committed Mar 28, 2013
  3. Add a warning about signalfd

    msantos committed Mar 28, 2013
  4. Include header for memcpy

    msantos committed Mar 28, 2013
  5. rebar: update URL

    msantos committed Mar 28, 2013
  6. Copyright heartbeat

    msantos committed Mar 28, 2013
Commits on Aug 9, 2012
Commits on Jul 30, 2012
Commits on Jul 15, 2012
  1. Document perc_signal

    msantos committed Jul 15, 2012
    The perc calls into the C functions aren't documented yet. The arguments
    may change from an integer (the fd) to a NIF resource in the future.
  2. Allow the caller to specify the fd

    msantos committed Jul 15, 2012
    Add signalfd/2 to pass in already opened file descriptors; for example,
    if the caller wants to change the signal mask.
  3. Chunk merged signals into separate messages

    msantos committed Jul 15, 2012
    One read may return multiple signals. Convert each signal into an
    individual message.
    The code does not handle partial signals. If partial reads are possible,
    the gen_server will need to maintain the partial data in its state.
    Running the tests, the VM is sometimes printing out the signal. The
    behaviour of signals is mysterious. Presumably the VM has its own signal
    handler that is also firing. Whether this will affect the state of the
    VM is an open isssue.
  4. Add support for handling for signal

    msantos committed Jul 15, 2012
    On Linux (and hopefully other OS'es that support signalfd), support
    reliable signal handling using signalfd(2).
Commits on Jul 8, 2012
  1. Add signal names

    msantos committed Jul 8, 2012
    Map of name to numbers taken from a Linux system. If the numbers vary by
    system, the header macros will have to call a function which sets the
    values based on os.
    Dither still on whether to use functions or macros for defining
Commits on Jul 6, 2012
  1. Add support for process niceness values

    msantos committed Jul 6, 2012
    Support getpriority(2)/setpriority(2).
Commits on Jun 30, 2012
  1. Add prlimit test

    msantos committed Jun 30, 2012
  2. Pasto on i686

    msantos committed Jun 30, 2012
Commits on Jun 29, 2012
  1. Interface to kill(2)

    msantos committed Jun 29, 2012