diff rvinterf/libasync/init.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 e7502631a0f9
children c1aadfcd185f
line wrap: on
line diff
--- a/rvinterf/libasync/init.c	Wed Oct 26 21:36:07 2016 +0000
+++ b/rvinterf/libasync/init.c	Wed Oct 26 22:00:39 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * This module contains the common initialization code for fc-tmsh and g23sh.
+ * This module contains the common initialization code for fc-shell and fc-tmsh.
  */
 
 #include <sys/types.h>
@@ -12,6 +12,7 @@
 #include <unistd.h>
 #include "pktmux.h"
 #include "localsock.h"
+#include "exitcodes.h"
 
 extern char *socket_pathname;
 extern int sock;
@@ -26,7 +27,7 @@
 	sock = socket(AF_UNIX, SOCK_STREAM, 0);
 	if (sock < 0) {
 		perror("socket(AF_UNIX, SOCK_STREAM, 0)");
-		exit(1);
+		exit(ERROR_UNIX);
 	}
 
 	local.sun_family = AF_UNIX;
@@ -48,7 +49,7 @@
 	rc = connect(sock, (struct sockaddr *) &local, namelen);
 	if (rc != 0) {
 		perror(socket_pathname);
-		exit(1);
+		exit(ERROR_RVINTERF);
 	}
 
 	return(0);