src/process.{c,h}: add GError handling