| Commit message (Collapse) | Author | Age | Lines | |
|---|---|---|---|---|
| * | Mark slave_exec() as "noreturn" and convert xassert(false) to BUG(...) | Craig Barnes | 2021-02-10 | -2/+3 |
| | | ||||
| * | slave: skip e310487dae99 if not supported | Jan Beich | 2021-01-21 | -0/+2 |
| | | | | | | | slave.c:188:26: error: use of undeclared identifier 'IUTF8' flags.c_iflag |= IUTF8; ^ | |||
| * | debug: rename assert() to xassert(), to avoid clashing with <assert.h> | Craig Barnes | 2021-01-16 | -2/+2 |
| | | ||||
| * | Print stack trace on assert() failure or when calling fatal_error() | Craig Barnes | 2021-01-16 | -1/+1 |
| | | | | | | | Note: this uses the __sanitizer_print_stack_trace() function from the AddressSanitizer runtime, so it only works when AddressSanitizer is in use. | |||
| * | log: include 'fmt' in __VA_ARGS__ | Daniel Eklöf | 2020-08-23 | -2/+3 |
| | | | | | | This ensures all calls have at least one __VA_ARGS__ argument, thus making them ISO C99 compliant. | |||
| * | slave: set $COLORTERM environment variable to "truecolor" | Craig Barnes | 2020-08-23 | -0/+1 |
| | | | | | | | | This is also done by libvte, alacritty, kitty and several other terminal emulators as a way to indicate support for 24-bit RGB colors. It generally also implies support for the xterm 256-color palette and basic ECMA-48 colors. | |||
| * | Convert most dynamic allocations to use functions from xmalloc.h | Craig Barnes | 2020-08-08 | -4/+5 |
| | | ||||
| * | Replace non-portable "\e" escape in string literals with "\033" | Craig Barnes | 2020-08-02 | -4/+4 |
| | | ||||
| * | Revert "slave: use an event FD to communicate errors after fork before exec" | Daniel Eklöf | 2020-08-01 | -17/+20 |
| | | | | | | | | | | | | | | | | | | This reverts commit 027a8de6f547115fd90b8ee612fc616b61d5000c. I was a bit quick on this one, and only tested error cases. Turns out, this causes foot to hang in a blocking read(3) on the event FD. This is because while the FD has FD_CLOEXEC, that flag is per file descriptor. I.e. the forked copy of the event fd is closed when we exec(), but since this isn't a pipe, nothing is signaled to the parent process, which thus remains blocking in read(3) since its copy of the event fd hasn't been closed. We _could_ write a dummy value on the event fd just before exec(), but then we wouldn't be able to catch errors from exec() self - only errors *before* exec(). | |||
| * | slave: use an event FD to communicate errors after fork before exec | Daniel Eklöf | 2020-08-01 | -20/+17 |
| | | | | | | | | | Replace the pipe we used to communicate errors after fork(), but before exec() to the parent process with an event FD. The overhead in the kernel is much lower to setup an event fd, compared to a pipe. | |||
| * | slave: emit user-notifications before dup:ing stdin/stdout/stderr | Daniel Eklöf | 2020-08-01 | -40/+43 |
| | | | | | | | | | | Since we need to restore the status flags anyway, there's nothing to gain from emitting the user notifications after dup:ing the pts file descriptor. On the other hand, emitting user notifications *before* dup:ing means we can still print error messages for e.g. write(3) errors. | |||
| * | slave: user-notifications: skip the O_NONBLOCK dance when there aren't any notifications | Daniel Eklöf | 2020-07-31 | -1/+1 |
| | | ||||
| * | slave: restore pts file status flags after emitting user-notifications | Daniel Eklöf | 2020-07-31 | -3/+5 |
| | | | | | | | | | | | | | | | | We (need to) set O_NONBLOCK on the pts file description before emitting the user-notifications, to ensure we don't block in write(3). However, since file status flags are per *file*, not per file *descriptor*, this ends up setting O_NONBLOCK on the dup:ed stdin/stdout/stderr file descriptors too. Not all clients want this, or can handle this. Thus we need to restore the original flags before exec:ing the client. This fixes "makepkg" build failures. | |||
| * | slave: user-notifications: don't block in write(3) | Daniel Eklöf | 2020-07-31 | -0/+18 |
| | | | | | | | | | | | | The main process is blocking and waiting for us to close the error pipe (in exec(3), via O_CLOEXEC). Thus, pts data will *not* be processed until we've exec:d the shell. Because of this we must not write too much and block in write(3). Do this by setting O_NONBLOCK on the pts fd (*after* dup:ing it to stdin/stderr/sdout) and watch for EAGAIN EWOULDBLOCK. | |||
| * | slave: user-notifications: emit errors first, then warnings and last deprecations | Daniel Eklöf | 2020-07-31 | -2/+21 |
| | | ||||
| * | user-notification: 'productify' the user-warning system | Daniel Eklöf | 2020-07-30 | -38/+48 |
| | | | | | | | | | * Rename user_warning to user_notification * Add warning and error types (in addition to the existing deprecated) * Simplify logic when emitting a user notification after forking; we don't need to copy the notification data since we're in a new process and have total control over that memory. | |||
| * | slave: don't ignore write(3) errors | Daniel Eklöf | 2020-07-29 | -3/+14 |
| | | ||||
| * | term: add capability to print warnings *inside* the terminal | Daniel Eklöf | 2020-07-29 | -3/+31 |
| | | | | | | This is intended to be used to print e.g. deprecation warnings inside the terminal, *before* the shell is started. | |||
| * | slave: set IUTF8 | Daniel Eklöf | 2020-05-26 | -0/+14 |
| | | ||||
| * | slave: restore signal mask | Daniel Eklöf | 2020-05-21 | -1/+4 |
| | | ||||
| * | slave: configure pts to be the controlling terminal of the forked process | Daniel Eklöf | 2020-05-13 | -0/+7 |
| | | ||||
| * | slave: set $SHELL when command line is a shell listed in /etc/shells | Daniel Eklöf | 2020-03-02 | -0/+51 |
| | | ||||
| * | slave: check return value of chdir() | Daniel Eklöf | 2020-02-20 | -1/+6 |
| | | ||||
| * | slave: prefix argv[0] with a '-' when spawning a login-shell | Daniel Eklöf | 2020-02-20 | -5/+26 |
| | | ||||
| * | term: term_init: add 'cwd' argument | Daniel Eklöf | 2019-12-21 | -1/+3 |
| | | | | | | | | | | | This is used when spawning the slave, to set its current working directory just before we exec() the client. In a regular foot instance, we set the cwd from getcwd(). In a foot server instance, each connecting client sends its cwd to the server, and we use that. | |||
| * | term: term_spawn_new(): new function, spawns a new foot/footclient process | Daniel Eklöf | 2019-12-21 | -0/+1 |
| | | | | | Bind ctrl+shift+return to it | |||
| * | slave: restore signals before calling exec() | Daniel Eklöf | 2019-11-03 | -1/+13 |
| | | ||||
| * | slave: remove unneeded define | Daniel Eklöf | 2019-11-03 | -1/+0 |
| | | ||||
| * | slave: turn on FD_CLOEXEC after slave has been spawned | Daniel Eklöf | 2019-11-03 | -0/+9 |
| | | | | | | This ensures that our ptmx FD isn't carried over to other terminals spawned later. | |||
| * | slave: set TERM environment variable in slave process | Daniel Eklöf | 2019-11-01 | -1/+4 |
| | | ||||
| * | slave: log child's errno, not parents | Daniel Eklöf | 2019-10-30 | -2/+2 |
| | | ||||
| * | slave: fix debug logging (no 'term' variable) | Daniel Eklöf | 2019-10-30 | -2/+2 |
| | | ||||
| * | term: move client startup to a new function, slave_spawn() | Daniel Eklöf | 2019-10-30 | -2/+70 |
| | | ||||
| * | slave: rename slave_spawn() -> slave_exec() | Daniel Eklöf | 2019-10-30 | -1/+1 |
| | | ||||
| * | main: allow user to override shell on the command line | Daniel Eklöf | 2019-07-17 | -8/+1 |
| | | ||||
| * | slave: break out command line tokenizer | Daniel Eklöf | 2019-07-17 | -79/+1 |
| | | ||||
| * | slave: report exec() failure back to main process | Daniel Eklöf | 2019-07-17 | -1/+2 |
| | | ||||
| * | slave: exec shell from conf | Daniel Eklöf | 2019-07-17 | -2/+87 |
| | | ||||
| * | logging: disable debug logging by default | Daniel Eklöf | 2019-07-03 | -1/+1 |
| | | ||||
| * | slave: remove initial debug code | Daniel Eklöf | 2019-06-29 | -16/+0 |
| | | ||||
| * | wip: vt parsing: initial csi/osc dispatching | Daniel Eklöf | 2019-06-15 | -0/+5 |
| | | ||||
| * | Initial handling of multi byte characters | Daniel Eklöf | 2019-06-13 | -1/+1 |
| | | | | | Use mblen() to calculate the byte count for each character. | |||
| * | Render cursor | Daniel Eklöf | 2019-06-13 | -0/+3 |
| | | ||||
| * | Use frame callback to rate-limit surface updates | Daniel Eklöf | 2019-06-13 | -0/+3 |
| | | ||||
| * | initial grid implementation | Daniel Eklöf | 2019-06-13 | -1/+2 |
| | | | | | | This allows us to render *something*, even though it's inefficient, stupid and far far away from the real thing. | |||
| * | Set up pseudo terminal and fork slave | Daniel Eklöf | 2019-06-13 | -0/+67 |
