X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FExitCodes.hs;h=65a519869cf3f88ecfa86c64c0353b4d0c9c4553;hb=ceea515f038b6153d33750ae46e840e116418867;hp=653b1c98c94a0d18f3c044302461d4166ba82f31;hpb=7bb00e04c15781d889f950d00babf3f183047bff;p=dead%2Fhalcyon.git diff --git a/src/ExitCodes.hs b/src/ExitCodes.hs index 653b1c9..65a5198 100644 --- a/src/ExitCodes.hs +++ b/src/ExitCodes.hs @@ -1,17 +1,20 @@ --- |All exit codes that the program can return (excepting --- ExitSuccess). There's only one, since the program will try and fail --- forever upon errors. +-- | All exit codes that the program can return (excepting +-- ExitSuccess). module ExitCodes ( - exit_args_parse_failed, - exit_no_usernames - ) + exit_no_usernames, + exit_pidfile_exists ) where --- |Indicates that the command-line arguments could not be parsed. -exit_args_parse_failed :: Int -exit_args_parse_failed = 1 -- | No usernames found on either the command-line or in a config -- file. exit_no_usernames :: Int -exit_no_usernames = 2 +exit_no_usernames = 1 + + +-- | When running as a daemon, the existence of a fixed PID file is +-- used to determine whether or not the daemon is already +-- running. If the PID file already exists, we shouldn't start. +-- +exit_pidfile_exists :: Int +exit_pidfile_exists = 2