[android] fix untracked pid in Android (#3343)

This commit is contained in:
Yakun Xu
2018-12-04 14:38:55 -08:00
committed by Jonathan Hui
parent b61be18e37
commit 4c783e5584
2 changed files with 12 additions and 1 deletions
+6 -1
View File
@@ -121,9 +121,14 @@ exit:
return error;
}
HdlcInterface::~HdlcInterface(void)
{
Deinit();
}
void HdlcInterface::Deinit(void)
{
assert(mSockFd != -1);
VerifyOrExit(mSockFd != -1);
VerifyOrExit(0 == close(mSockFd), perror("close NCP"));
VerifyOrExit(-1 != wait(NULL), perror("wait NCP"));
+6
View File
@@ -79,6 +79,12 @@ public:
*/
explicit HdlcInterface(Callbacks &aCallbacks);
/**
* This destructor deinitializes the object.
*
*/
~HdlcInterface(void);
/**
* This method initializes the interface to the Radio Co-processor (RCP)
*