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:38:40 +0000

On Mon, Feb 15, 2016 at 11:37:15AM +0100, FRIGN wrote:
> On Mon, 15 Feb 2016 10:34:15 +0000
> Dimitris Papastamos <sin_AT_2f30.org> wrote:
>
> Hey Dimitris,
>
> > Yes this pattern is used in sbase. There is no point however
> > replicating it to other projects.
>
> so how would you approach this? If slock was only a main()-function,
> one could've thought to just pass argv[0] to each call of die.
> But it is not.
>
> Would your approach be to just set argv0 as argv[0] and carry on
> without modifying argc, argv?
> I was surprised this idiomatic one-liner has received such opposition.

The code was fine as it was.
Received on Mon Feb 15 2016 - 11:38:40 CET

This archive was generated by hypermail 2.3.0 : Mon Feb 15 2016 - 11:48:32 CET