<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/slave.c, branch 1.6.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.6.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.6.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2020-08-23T08:07:08Z</updated>
<entry>
<title>log: include 'fmt' in __VA_ARGS__</title>
<updated>2020-08-23T08:07:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-23T05:44:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c779a5ec7deecf91cb9aca298af90cbc2d9c04d7'/>
<id>urn:sha1:c779a5ec7deecf91cb9aca298af90cbc2d9c04d7</id>
<content type='text'>
This ensures all calls have at least one __VA_ARGS__ argument, thus
making them ISO C99 compliant.
</content>
</entry>
<entry>
<title>slave: set $COLORTERM environment variable to "truecolor"</title>
<updated>2020-08-23T04:33:48Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2020-08-23T04:31:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=26fccae03dba5ca9a827d42c4c20ab373bb1e425'/>
<id>urn:sha1:26fccae03dba5ca9a827d42c4c20ab373bb1e425</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Convert most dynamic allocations to use functions from xmalloc.h</title>
<updated>2020-08-08T19:37:57Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2020-08-08T19:34:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7a77958ba20c2b344be5e66e69e2f212a4bbf6b3'/>
<id>urn:sha1:7a77958ba20c2b344be5e66e69e2f212a4bbf6b3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Replace non-portable "\e" escape in string literals with "\033"</title>
<updated>2020-08-02T22:54:04Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2020-08-02T22:54:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=11a1d99da732cad13995dcbfc04b6559b5255d01'/>
<id>urn:sha1:11a1d99da732cad13995dcbfc04b6559b5255d01</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Revert "slave: use an event FD to communicate errors after fork before exec"</title>
<updated>2020-08-01T07:41:31Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-01T07:41:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=bae3244ec6344bf0d28a01fa06895b9ad2d6c293'/>
<id>urn:sha1:bae3244ec6344bf0d28a01fa06895b9ad2d6c293</id>
<content type='text'>
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().
</content>
</entry>
<entry>
<title>slave: use an event FD to communicate errors after fork before exec</title>
<updated>2020-08-01T07:33:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-01T07:33:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=027a8de6f547115fd90b8ee612fc616b61d5000c'/>
<id>urn:sha1:027a8de6f547115fd90b8ee612fc616b61d5000c</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>slave: emit user-notifications before dup:ing stdin/stdout/stderr</title>
<updated>2020-08-01T07:00:18Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-01T07:00:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c8e78674ed3fb19bab55cfbdac5db8a320e8e721'/>
<id>urn:sha1:c8e78674ed3fb19bab55cfbdac5db8a320e8e721</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>slave: user-notifications: skip the O_NONBLOCK dance when there aren't any notifications</title>
<updated>2020-07-31T17:52:50Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-31T17:52:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7e93405b1a987c8d1aef17ba348ce9bb746ffa9a'/>
<id>urn:sha1:7e93405b1a987c8d1aef17ba348ce9bb746ffa9a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>slave: restore pts file status flags after emitting user-notifications</title>
<updated>2020-07-31T16:13:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-31T16:13:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1da8142f324d6011a60c19b77be24a6faf00180e'/>
<id>urn:sha1:1da8142f324d6011a60c19b77be24a6faf00180e</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>slave: user-notifications: don't block in write(3)</title>
<updated>2020-07-31T15:15:51Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-31T15:15:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a7d21c5c7f02241732818d747d4ee27f54a65c5f'/>
<id>urn:sha1:a7d21c5c7f02241732818d747d4ee27f54a65c5f</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>slave: user-notifications: emit errors first, then warnings and last deprecations</title>
<updated>2020-07-31T15:10:39Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-31T15:10:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b661513245e5bc07358237a39e4d100d124f64fc'/>
<id>urn:sha1:b661513245e5bc07358237a39e4d100d124f64fc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>user-notification: 'productify' the user-warning system</title>
<updated>2020-07-30T16:58:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-30T16:57:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f6533a71e4996f2f4cd45336966cebf6c3f34b1e'/>
<id>urn:sha1:f6533a71e4996f2f4cd45336966cebf6c3f34b1e</id>
<content type='text'>
* 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.
</content>
</entry>
<entry>
<title>slave: don't ignore write(3) errors</title>
<updated>2020-07-29T17:46:20Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-29T17:46:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=113759b0a9cf4954f64dd59a65654fcb85d43792'/>
<id>urn:sha1:113759b0a9cf4954f64dd59a65654fcb85d43792</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: add capability to print warnings *inside* the terminal</title>
<updated>2020-07-29T17:42:12Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-29T17:42:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b3d0215c388c51a7e9838d16fe06023844af5c8b'/>
<id>urn:sha1:b3d0215c388c51a7e9838d16fe06023844af5c8b</id>
<content type='text'>
This is intended to be used to print e.g. deprecation warnings inside
the terminal, *before* the shell is started.
</content>
</entry>
<entry>
<title>slave: set IUTF8</title>
<updated>2020-05-26T16:18:11Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-26T16:18:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e310487dae99e774fa31db41add33a114d09de6c'/>
<id>urn:sha1:e310487dae99e774fa31db41add33a114d09de6c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>slave: restore signal mask</title>
<updated>2020-05-21T18:22:24Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-21T18:22:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c605503df6b5f265e65b5017870417401d969555'/>
<id>urn:sha1:c605503df6b5f265e65b5017870417401d969555</id>
<content type='text'>
</content>
</entry>
<entry>
<title>slave: configure pts to be the controlling terminal of the forked process</title>
<updated>2020-05-13T11:07:44Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-13T11:04:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e654cf38800228c363d47a507139bcca5bf31d29'/>
<id>urn:sha1:e654cf38800228c363d47a507139bcca5bf31d29</id>
<content type='text'>
</content>
</entry>
<entry>
<title>slave: set $SHELL when command line is a shell listed in /etc/shells</title>
<updated>2020-03-02T17:46:35Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-02T17:46:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6912bbd310d1c8cdc4f019dd5887cc9fdf679806'/>
<id>urn:sha1:6912bbd310d1c8cdc4f019dd5887cc9fdf679806</id>
<content type='text'>
</content>
</entry>
<entry>
<title>slave: check return value of chdir()</title>
<updated>2020-02-20T17:46:35Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-02-20T17:46:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f1b1ac39f6ac5fc9b7ca59ff559bc588c852c89f'/>
<id>urn:sha1:f1b1ac39f6ac5fc9b7ca59ff559bc588c852c89f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>slave: prefix argv[0] with a '-' when spawning a login-shell</title>
<updated>2020-02-20T17:36:09Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-02-20T17:36:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b5efe984bbfec151b70d3450f4f18243313de497'/>
<id>urn:sha1:b5efe984bbfec151b70d3450f4f18243313de497</id>
<content type='text'>
</content>
</entry>
</feed>
