summaryrefslogtreecommitdiff
path: root/src/biruda.c
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2014-11-16 20:16:01 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2014-11-16 20:16:01 +0100
commit36a9558737abb4fc6440903361a6c175a4140f35 (patch)
tree1d08e3f3ecdf41ebecf017222cb1cbcf2edd09b5 /src/biruda.c
parent3ecaed99580f378fbcb2598b2570c65d0f3ebc99 (diff)
downloadbiruda-36a9558737abb4fc6440903361a6c175a4140f35.tar.gz
biruda-36a9558737abb4fc6440903361a6c175a4140f35.tar.bz2
workers are communicated from coordinator to master during registration now
status shows worker states too
Diffstat (limited to 'src/biruda.c')
-rw-r--r--src/biruda.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/biruda.c b/src/biruda.c
index 362ca50..28725bc 100644
--- a/src/biruda.c
+++ b/src/biruda.c
@@ -365,7 +365,9 @@ static int start_interactive( bool colors )
break;
}
} else {
- fgets( buf, sizeof( buf ), stdin );
+ if( fgets( buf, sizeof( buf ), stdin ) == NULL ) {
+ return EXIT_SUCCESS;
+ }
line = buf;
}
@@ -389,7 +391,7 @@ static int start_interactive( bool colors )
} else if( strncasecmp( line, "status", 6 ) == 0 ) {
print_status( );
} else {
- print_error( "Bad command." );
+ print_error( "Bad command '%s'.", line );
}
}