My shell prompt
Go to file
Érico Nogueira bd30334277 Manually set thread stack sizes.
8KB was empirically determined to work on musl. We can't go lower (musl
supports up to 2KB) because posix_spawn allocates a temporary stack for
vfork (via clone(2)) on its own stack.

This improves our resource consumption and increases the likeliness for
pthread_create to work even when there isn't a lot of free memory.

Using pthread_setattr_default_np isn't possible, because on musl it
doesn't allow us to go below the default thread stack size. This way is
also more portable.

We don't remove the guard pages entirely, because a shell prompt might
be active in attacker controlled directories, and it's a reasonable
protection against any stack overflow exploits that might appear.
2021-07-17 20:58:16 -03:00
po Change translated strings to .c file. 2021-02-22 01:57:46 -03:00
.gitignore Initial commit. 2021-02-22 00:38:41 -03:00
Makefile Add color support. 2021-07-17 19:39:15 -03:00
colors.c Add color support. 2021-07-17 19:39:15 -03:00
colors.h Add color support. 2021-07-17 19:39:15 -03:00
ep.c Manually set thread stack sizes. 2021-07-17 20:58:16 -03:00
ep.h Manually set thread stack sizes. 2021-07-17 20:58:16 -03:00
git.c Manually set thread stack sizes. 2021-07-17 20:58:16 -03:00
lang.c Disable color support in lang output. 2021-07-17 19:52:29 -03:00
out.c Move output and path handling code outside main. 2021-02-22 01:53:44 -03:00
path.c Fix showing current path again. 2021-03-07 04:17:23 -03:00
ssh.c Use color support where appropriate. 2021-07-17 19:47:50 -03:00