Function needs to return an sg_error.
Remove warning: pid may not be an int, so cast it.
isspace needs <ctype.h>
Remove warnings: variable unused after assignment.

In both cases the result of a function is assigned to a variable,
but that variable is never used. This change removes the compiler
warning this generates, but it should probably be reviewed to check
if instead we should be doing something with the variable.