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

From: FRIGN <dev_AT_frign.de>
Date: Mon, 15 Feb 2016 11:37:15 +0100

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.

Cheers

FRIGN

-- 
FRIGN <dev_AT_frign.de>
Received on Mon Feb 15 2016 - 11:37:15 CET

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