Postpone cleaning up of child until getChildResult() is called
commit58cc1c43f297d9d2a7fdf13a640b1f6ade853886
authorJonas Fonseca <fonseca@diku.dk>
Mon, 3 Dec 2007 01:26:38 +0000 (3 02:26 +0100)
committerJonas Fonseca <fonseca@diku.dk>
Fri, 7 Dec 2007 12:46:40 +0000 (7 13:46 +0100)
treeb975bce853e24d30201147ef71dafd0ae2f2f6ec
parentd484a2d3f22192c421cae115ed55858193fbd915
Postpone cleaning up of child until getChildResult() is called

This basically just moves the cleanUpProgram() a few cycles later with
respect to MoteHote::handleMoteData. Before it happened in readBuf() now
it happens a few lines later in handleMoteData when it calls
getChildResult(). Allows the childResult member to be removed.

It also feels better to postpone the waitpid() so that the SerialControl
destructor can safely assumes that cancelProgram() will not hang.
diku_mch/MoteHost.cc
diku_mch/SerialControl.cc
diku_mch/SerialControl.h