Oh! The RPC server is buffering its output. I found it by digging into the add_svc.c
code to add debugging statements. Printing something after the call to the remote call fixed it.
That's a terrible solution, though, because that code is automatically generated.
Instead, you have two choices.
- After your
printf()
call, flush the output buffers withfflush(stdout);
- Add a carriage return (
\n
) to the end of your output string.
Either will work fine.
For the reasons behind this, see this question.