koush/Superuser — pull request #206 by Lekensteyn (2013-11-24 14:47:32+00:00)
Title: daemon: do not leak resources

Before this patch, the client was responsible for removing FIFOs before
connecting. That left a whole bunch of FIFOs in the SuperUser /dev/...
directory. After This patch, the daemon removes FIFOs as soon as the client is
connected. (This is detected by making the daemon read from the control socket.)

This patch becomes unnecessary when file descriptors can be passed though
processes. (#181, #183)

Oh, and while at it, I also fixed the exit code when a program exits abnormally (signalled).

Tested with the latest CM-10.2 git sources on GT-i9300, logcat and `adb shell` are still functioning.