#include "private.h"
#include <ctype.h>
Functions | |
void | set_exit_status (enum exit_status_type new_status) |
void | my_exit (enum exit_status_type status) |
static const char * | read_name (const args_info *args) |
int | main (int argc, char **argv) |
Variables | |
static enum exit_status_type | exit_status = E_SUCCESS |
Exit status to use. This can be changed with set_exit_status(). |
void set_exit_status | ( | enum exit_status_type | new_status | ) |
Sets the exit status after a warning or error has occurred. If new_status is EX_WARNING and the old exit status was already EX_ERROR, the exit status is not changed.
References exit_status.
void my_exit | ( | enum exit_status_type | status | ) |
Exits the program using the given status. This takes care of closing stdin, stdout, and stderr and catches possible errors. If we had got a signal, this function will raise it so that to the parent process it appears that we were killed by the signal sent by the user.
References signals_exit(), and V_ERROR.
Referenced by message_help(), and message_version().
enum exit_status_type exit_status = E_SUCCESS [static] |