> The webrev http://cr.opensolaris.org/~padraig/ips-6549-v1/ fixed > 6549 Defunct subprocess of packagemanager > > This is a simple fix which just adds a call to proc.wait() on the > subprocess.
A few comments here. - Do you want / need to check the process return code that is returned by wait()? There's some amount of error handling here that you might be able to perform by checking the return code instead of parsing the output from stderr. - If you do need to parse stderr, there are some alternatives to the current approach. Popen.communicate() returns a (stdout, stderr) tuple and waits for the process to terminate. If the output from beadm is expected to be small, this would be the way to go. - If you want to read stderr directly, as the code does now, the stderr.read() should go before the proc.wait(). Since the beadm command is writing its stderr to a pipe, this write can block once the pipe gets filled. If you don't drain the pipe until wait() returns, it's possible that the process won't ever exit, since it's blocked while writing the error message. -j _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
