diff rvinterf/libasync/launchrvif.c @ 63:09b4fd9b3827

rvinterf/libasync: use the newly adopted exit code convention
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 26 Oct 2016 22:00:39 +0000
parents fb4804f72ac0
children
line wrap: on
line diff
--- a/rvinterf/libasync/launchrvif.c	Wed Oct 26 21:36:07 2016 +0000
+++ b/rvinterf/libasync/launchrvif.c	Wed Oct 26 22:00:39 2016 +0000
@@ -1,6 +1,6 @@
 /*
  * This module implements the optional "behind the scenes" invokation
- * of rvinterf from fc-tmsh.
+ * of rvinterf from fc-shell or fc-tmsh.
  */
 
 #include <sys/types.h>
@@ -8,6 +8,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include "exitcodes.h"
 
 static char rvinterf_pathname[] = "/opt/freecalypso/bin/rvinterf";
 
@@ -24,7 +25,7 @@
 	rc = socketpair(AF_UNIX, SOCK_STREAM, 0, sp);
 	if (rc < 0) {
 		perror("socketpair");
-		exit(1);
+		exit(ERROR_UNIX);
 	}
 	sock = sp[0];
 	sprintf(Sarg, "-S%d", sp[1]);
@@ -49,7 +50,7 @@
 	rc = vfork();
 	if (rc < 0) {
 		perror("vfork for launching rvinterf");
-		exit(1);
+		exit(ERROR_UNIX);
 	}
 	if (!rc) {
 		/* we are in the child - do the exec */