Skip to content

Commit 4282a00

Browse files
committed
Cleanup: Don't start master just to exit
1 parent 913c7ad commit 4282a00

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/rtapi/uspace_rtapi_main.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,11 @@ int main(int argc, char **argv) {
541541
int result = ::bind(fd, (sockaddr*)&addr, len+sizeof(addr.sun_family)+1);
542542

543543
if(result == 0) {
544+
//If called in master mode with exit command, no need to start master
545+
//and exit again
546+
if(args.size() == 1 && args[0] == "exit") {
547+
return 0;
548+
}
544549
int result = listen(fd, 10);
545550
if(result != 0) { perror("listen"); exit(1); }
546551
setsid(); // create a new session if we can...

0 commit comments

Comments
 (0)