Re: [hackers] [slock] Use argv0 instead of passing "slock:" to die every time || FRIGN

From: Dimitris Papastamos <sin_AT_2f30.org>
Date: Mon, 15 Feb 2016 10:34:15 +0000

On Mon, Feb 15, 2016 at 11:30:59AM +0100, FRIGN wrote:
> On Mon, 15 Feb 2016 11:22:08 +0100
> Markus Teich <markus.teich_AT_stusta.mhn.de> wrote:
>
> Hey Markus,
>
> > why this `argc--, argv++` shenanigans? I think it's more confusing rather than
> > helping.
>
> we came up with this in sbase/ubase as an idiomatic way to set argv0
> for tools that don't use arg.h.
> We need argv0 here because I moved the prepending of the argv[0] into
> die(), and thus we need to store the argv0 in a global variable.

Yes this pattern is used in sbase. There is no point however
replicating it to other projects.
Received on Mon Feb 15 2016 - 11:34:15 CET

This archive was generated by hypermail 2.3.0 : Mon Feb 15 2016 - 11:36:19 CET