diff --git a/src/smap/smap.c b/src/smap/smap.c
index 5ecb4fc01deef774095b683e7ff0dbc5d85d3766..9e2ee49183a85505ac23f20b56cc07f64433def5 100644
--- a/src/smap/smap.c
+++ b/src/smap/smap.c
@@ -183,7 +183,7 @@ part_fini:
 			      COLS, 
 			      LINES);
 			ba_fini();
-			exit(0);
+			exit(1);
 		}
 		
 		raw();
@@ -253,7 +253,7 @@ part_fini:
 			if(!params.commandline)
 				endwin();
 			ba_fini();
-			exit(0);
+			exit(1);
 			break;
 #endif
 		}
diff --git a/src/squeue/squeue.c b/src/squeue/squeue.c
index f557ed3b838378caf3922c47ad97d156a94e04fc..4fe3c54220d4b71593ca5b90bbc253a3b32d8c50 100644
--- a/src/squeue/squeue.c
+++ b/src/squeue/squeue.c
@@ -64,13 +64,14 @@ int max_line_size;
  ************/
 static int  _get_window_width( void );
 static void _print_date( void );
-static void _print_job (void);
-static void _print_job_steps( void );
+static int _print_job (void);
+static int _print_job_steps( void );
 
 int 
 main (int argc, char *argv[]) 
 {
 	log_options_t opts = LOG_OPTS_STDERR_ONLY ;
+	int error_code = SLURM_SUCCESS;
 
 	log_init(xbasename(argv[0]), opts, SYSLOG_FACILITY_USER, NULL);
 	parse_command_line( argc, argv );
@@ -87,9 +88,9 @@ main (int argc, char *argv[])
 			_print_date ();
 		
 		if ( params.step_flag )
-			_print_job_steps( );
-		else 
-			_print_job( );
+			error_code = _print_job_steps( );
+		else
+			error_code = _print_job( );
 		
 		if ( params.iterate ) {
 			printf( "\n");
@@ -99,7 +100,10 @@ main (int argc, char *argv[])
 			break;
 	}
 
-	exit (0);
+	if ( error_code != SLURM_SUCCESS )
+		exit (error_code);
+	else
+		exit (0);
 }
 
 /* get_window_width - return the size of the window STDOUT goes to */
@@ -127,7 +131,7 @@ _get_window_width( void )
 
 
 /* _print_job - print the specified job's information */
-static void 
+static int
 _print_job ( void ) 
 {
 	static job_info_msg_t * old_job_ptr = NULL, * new_job_ptr;
@@ -168,7 +172,7 @@ _print_job ( void )
 
 	if (error_code) {
 		slurm_perror ("slurm_load_jobs error");
-		return;
+		return SLURM_ERROR;
 	}
 	old_job_ptr = new_job_ptr;
 	if (job_id)
@@ -190,12 +194,12 @@ _print_job ( void )
 
 	print_jobs_array( new_job_ptr->job_array, new_job_ptr->record_count , 
 			params.format_list ) ;
-	return;
+	return SLURM_SUCCESS;
 }
 
 
 /* _print_job_step - print the specified job step's information */
-static void
+static int
 _print_job_steps( void )
 {
 	int error_code;
@@ -221,7 +225,7 @@ _print_job_steps( void )
 				&new_step_ptr, show_flags);
 	if (error_code) {
 		slurm_perror ("slurm_get_job_steps error");
-		return;
+		return SLURM_ERROR;
 	}
 	old_step_ptr = new_step_ptr;
 
@@ -237,7 +241,7 @@ _print_job_steps( void )
 	print_steps_array( new_step_ptr->job_steps, 
 			   new_step_ptr->job_step_count, 
 			   params.format_list );
-	return;
+	return SLURM_SUCCESS;
 }