aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-runserver/main.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-12-26 20:52:13 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-12-26 20:52:13 +0100
commit7bf68b0b617fb3ffa86f38fe06a49786883037f4 (patch)
tree797c86c0f24195555d4cd520a2a9c92c852be55b /src/blogc-runserver/main.c
parent509af4c66c0b6287ba281a2d1f01d69450f6109c (diff)
downloadblogc-7bf68b0b617fb3ffa86f38fe06a49786883037f4.tar.gz
blogc-7bf68b0b617fb3ffa86f38fe06a49786883037f4.tar.bz2
blogc-7bf68b0b617fb3ffa86f38fe06a49786883037f4.zip
*: binaries should always return 3 on errors, for consistency.
We used to return 1 or 2 in case of errors, with no special meaning, other than "something is wrong", but these codes are reserved. Now we always return 3.
Diffstat (limited to 'src/blogc-runserver/main.c')
-rw-r--r--src/blogc-runserver/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/blogc-runserver/main.c b/src/blogc-runserver/main.c
index 0b8d0fe..7f83f42 100644
--- a/src/blogc-runserver/main.c
+++ b/src/blogc-runserver/main.c
@@ -98,7 +98,7 @@ main(int argc, char **argv)
print_usage();
fprintf(stderr, "blogc-runserver: error: invalid "
"argument: -%c\n", argv[i][1]);
- rv = 2;
+ rv = 3;
goto cleanup;
}
}
@@ -107,7 +107,7 @@ main(int argc, char **argv)
print_usage();
fprintf(stderr, "blogc-runserver: error: only one positional "
"argument allowed\n");
- rv = 2;
+ rv = 3;
goto cleanup;
}
args++;
@@ -119,7 +119,7 @@ main(int argc, char **argv)
print_usage();
fprintf(stderr, "blogc-runserver: error: document root directory "
"required\n");
- rv = 2;
+ rv = 3;
goto cleanup;
}
@@ -127,7 +127,7 @@ main(int argc, char **argv)
print_usage();
fprintf(stderr, "blogc-runserver: error: invalid value for -m. "
"Must be integer > 0 and <= 1000\n");
- rv = 2;
+ rv = 3;
goto cleanup;
}