Open ckeen opened 6 years ago
I believe I've narrowed the issue down to the use of atexit().
From the function's man page,
When a child process is created via fork(2), it inherits copies of its parent's registrations. Upon a successful call to one of the exec(3) functions, all registrations are removed.
I suspected that the removal of registrations after an exec() was not actually being done, so I ran a small test.
!
command in Sam.I've opened a pull request with a naïve fix that seems to work, based on my using several shell commands in this session of Sam as well as many invocations of B from my shell… → #130
I could not narrow it down so far but sometimes the socket gets closed and removed from the filesystem. However the lock is still present, so one has to manually delete the lock file.
I suspect some EAGAIN failure on reading/writing to the descriptor but I have been unable to correctly trace this so far.