sinit

suckless init
git clone git://git.suckless.org/sinit
Log | Files | Refs | README | LICENSE

commit c09709f04fb60c89e0b6d401eac8785d4523b52d
parent 31dbd779dcbd5b7c2cd96a008f1f93c035e0a4f7
Author: sin <sin@2f30.org>
Date:   Wed, 12 Feb 2014 09:33:06 +0000

Sanitize working dir - default to "/"

Diffstat:
Msinit.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/sinit.c b/sinit.c @@ -36,6 +36,8 @@ main(void) return EXIT_FAILURE; setsid(); + chdir("/"); + sigemptyset(&set); for (i = 0; i < LEN(sigmap); i++) sigaddset(&set, sigmap[i].sig);