[hackers] [slock] [PATCHES] Refactor dontkillme() and mandoc manual

From: FRIGN <dev_AT_frign.de>
Date: Tue, 30 Aug 2016 22:31:28 +0200

Good evening fellow hackers,

two patches I already made a while ago, but just got around to publish
here.

The first is to refactor the dontkillme function with very strict error
checking and using file pointers rather than file descriptors, as
recommended by the Linux kernel team for accessing the procfs.
The second is converting the manpage to mandoc using the proven and
tested format used across suckless tools (sbase, ubase, sent,
farbfeld, ...) and beyond. Also the example was improved.

As food for thought, writing the manual page I noticed that we might
want a flag "-p" for slock to drop privileges before running the
command. s2ram might need root privileges, but it might be that a user
wants to run a simple command not needing root privileges.
Keeping this in mind, the usage string was altered from the short form
to the "extended" form so if we add a new flag in the future we won't
have to do it there.

Cheers

FRIGN

-- 
FRIGN <dev_AT_frign.de>
Received on Tue Aug 30 2016 - 22:31:28 CEST

This archive was generated by hypermail 2.3.0 : Tue Aug 30 2016 - 22:36:15 CEST