mirror of
https://github.com/michaeldv/pit.git
synced 2025-12-08 15:43:25 +00:00
Using UNIX-friendly return codes
A zero return code is the UNIX way of saying "success" while a non-zero return code means there was an error.
This commit is contained in:
@@ -45,7 +45,7 @@ void die(char *message, ...)
|
||||
}
|
||||
|
||||
free_externals();
|
||||
exit(0);
|
||||
exit(1);
|
||||
}
|
||||
/*
|
||||
** Forceful death.
|
||||
@@ -59,7 +59,7 @@ void perish(char *prefix)
|
||||
perror(NULL);
|
||||
|
||||
free_externals();
|
||||
exit(0);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void pit_version(char *argv[])
|
||||
@@ -89,5 +89,5 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
handler[candidate](&argv[1]);
|
||||
free_externals();
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user