<div dir="ltr">Hi,<div><br></div><div>how should the C module check if the subprocess succeeded, i.e. what is subprocess return code.</div><div><br></div><div>I just committed fix for r.mode (1) and before the fix, r.mode was pretending that everything is all right although it was not (r.reclass failed and printed help). Now the r.reclass does not fail and r.mode works, however there is still the check of return code missing.</div>

<div><br></div><div>So, the question is, how to deal with the failed subprocess when using G_popen_write and G_popen_close function as in case of r.mode. Unfortunately, ./lib/gis/popen.c does not contain any documentation, so that's why I'm asking.</div>

<div><br></div><div>Thanks,</div><div>Vaclav</div><div><br></div><div><br></div><div><div>[r58838] <a href="https://trac.osgeo.org/grass/changeset/58838">https://trac.osgeo.org/grass/changeset/58838</a></div></div><div>(1) Is anybody using r.mode? The bug was there for a long time.</div>

</div>