OSDN Git Service

daemon: do not leak resources
authorPeter Wu <lekensteyn@gmail.com>
Sun, 24 Nov 2013 00:01:21 +0000 (01:01 +0100)
committerPeter Wu <lekensteyn@gmail.com>
Sun, 24 Nov 2013 14:43:57 +0000 (15:43 +0100)
commit2055ffc80c015004301d3f1555dcde6190a85c9a
tree2e480b7fc73d1b52367858f0a98e7836dcccdd62
parentd5def0826e8f824cbd676f40fcfb5a8dfc03f7d3
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.
Superuser/jni/su/daemon.c