mirror of
git://git.suckless.org/slock
synced 2025-03-11 06:07:34 +00:00
simple X display locker utility
this patch does two things: 0. simplify the code by using posix_spawn() 1. unify the behavior of what happens if the post-lock cmd fails. currently, if `fork()` fails, slock will die without locking the screen. HOWEVER if `execvp()` fails it prints a message to stderr (which the user cannot see since the screen has been locked already) and only exits the child while the parent locks the screen. to reproduce: # slock some_bin_that_doesnt_exist this behavior is inconsistent, if the idea is that post-lock cmd is _not_ important then we shouldn't `die()` on `fork()` failure either. and if we assume that the post-lock cmd _is_ important, then we should die on exec failure as well. this patch assumes the latter and calls `die()` if `posix_spawn()` fails. |
||
---|---|---|
arg.h | ||
config.def.h | ||
config.mk | ||
explicit_bzero.c | ||
LICENSE | ||
Makefile | ||
README | ||
slock.1 | ||
slock.c | ||
util.h |
slock - simple screen locker ============================ simple screen locker utility for X. Requirements ------------ In order to build slock you need the Xlib header files. Installation ------------ Edit config.mk to match your local setup (slock is installed into the /usr/local namespace by default). Afterwards enter the following command to build and install slock (if necessary as root): make clean install Running slock ------------- Simply invoke the 'slock' command. To get out of it, enter your password.