In gpx-main.c/exit_handler(), the sio_port descriptor is only closed if it is > 2. That assumes that when it was opened, it was assigned a value of 3 or more. That won't be the case when the process is exec() and forked() in a context that doesn't open one or more of stdin, stdout, and stderr. That is, that test assumes that stdin=0, stdout=1, and stderr=3. That's not always true.
The test should be changed to "if(sio_port >= 0) close(sio_port);".
In gpx-main.c/exit_handler(), the sio_port descriptor is only closed if it is > 2. That assumes that when it was opened, it was assigned a value of 3 or more. That won't be the case when the process is exec() and forked() in a context that doesn't open one or more of stdin, stdout, and stderr. That is, that test assumes that stdin=0, stdout=1, and stderr=3. That's not always true.
The test should be changed to "if(sio_port >= 0) close(sio_port);".