- if (wrote < 0) {
- (void) kill(master, SIGUSR1);
- sigemptyset(&sigset);
- sigaddset(&sigset, SIGINT);
- for (;;)
- sigsuspend(&sigset);
- } else {
- /*
- * pass size of write back to master
- * (for EOT handling)
- */
- (void) atomic_write( cmd, (char *)&size, sizeof size);
- }
+ /*
+ * pass errno back to master for special handling
+ */
+ if (wrote < 0)
+ size = -errno;
+
+ /*
+ * pass size of write back to master
+ * (for EOT handling)
+ */
+ (void) atomic_write( cmd, (char *)&size, sizeof size);