Re: [hackers] [slock] Use argv0 instead of passing "slock:" to die every time || FRIGN
git_AT_suckless.org wrote:
> + argv0 = argv[0], argc--, argv++;
> - if (argc >= 2 && fork() == 0) {
> + if (argc >= 1 && fork() == 0) {
> if (dpy)
> close(ConnectionNumber(dpy));
> - execvp(argv[1], argv+1);
> - die("slock: execvp %s failed: %s\n", argv[1], strerror(errno));
> + execvp(argv[0], argv);
> + die("execvp %s failed: %s\n", argv[0], strerror(errno));
Heyho frign,
why this `argc--, argv++` shenanigans? I think it's more confusing rather than
helping.
--Markus
Received on Mon Feb 15 2016 - 11:22:08 CET
This archive was generated by hypermail 2.3.0
: Mon Feb 15 2016 - 11:24:26 CET