Re: [hackers] [st][PATCH 20/24] use EXIT_FAILURE/SUCCESS on exit

From: Laslo Hunhold <dev_AT_frign.de>
Date: Tue, 22 Jan 2019 15:22:50 +0100

On Mon, 21 Jan 2019 23:56:35 +0000
Oliver Galvin <odg_AT_riseup.net> wrote:

Dear Galvin,

I would object to such a change. We don't use EXIT_*-defines for a
reason.

With best regards

Laslo

> ---
> st.c | 4 ++--
> x.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/st.c b/st.c
> index 5a8cdcc..4b5e725 100644
> --- a/st.c
> +++ b/st.c
> _AT_@ -718,7 +718,7 @@ execsh(char *cmd, char *const *args)
> signal(SIGALRM, SIG_DFL);
>
> execvp(prog, args);
> - _exit(1);
> + _exit(EXIT_FAILURE);
> }
>
> void
> _AT_@ -735,7 +735,7 @@ sigchld(UNUSED int a)
>
> if (!WIFEXITED(stat) || WEXITSTATUS(stat))
> die("child finished with error '%d'\n", stat);
> - exit(0);
> + exit(EXIT_SUCCESS);
> }
>
> void
> diff --git a/x.c b/x.c
> index 9e9bd3e..bd55699 100644
> --- a/x.c
> +++ b/x.c
> _AT_@ -1751,7 +1751,7 @@ cmessage(XEvent *e)
> }
> } else if (e->xclient.data.l[0] >= 0 && (Atom)
> (e->xclient.data.l[0]) == xw.wmdeletewin) { ttyhangup();
> - exit(0);
> + exit(EXIT_SUCCESS);
> }
> }
>
> --
> 2.20.1


-- 
Laslo Hunhold <dev_AT_frign.de>

Received on Tue Jan 22 2019 - 15:22:50 CET

This archive was generated by hypermail 2.3.0 : Tue Jan 22 2019 - 15:24:23 CET