xdrstdio_create (&xdr, stdin, XDR_DECODE);
memset (&hdr, 0, sizeof hdr);
if (!wrap_int_xdr_message_header (&xdr, &hdr)) {
- fprintf (stderr, "error receiving request header\n");
+ /* No error message here, because this is the expected
+ * exit place when the connection is closed.
+ */
xdr_destroy (&xdr);
return;
}
void
wrap_close (wrap_h *w)
{
- if (w->pid)
- waitpid (w->pid, NULL, 0);
-
if (w->rfp != NULL)
fclose (w->rfp);
if (w->wfp != NULL)
fclose (w->wfp);
+ if (w->pid)
+ waitpid (w->pid, NULL, 0);
+
free (w->hostname);
free (w->wrappid_path);
free (w);