<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cimple/src/command.h, branch meson</title>
<subtitle>My little CI system (hopefully)</subtitle>
<id>http://git.tensin.name/cimple/atom?h=meson</id>
<link rel='self' href='http://git.tensin.name/cimple/atom?h=meson'/>
<link rel='alternate' type='text/html' href='http://git.tensin.name/cimple/'/>
<updated>2026-09-21T17:19:05Z</updated>
<entry>
<title>remove annoying trailing period from repo URLs</title>
<updated>2026-09-21T17:19:05Z</updated>
<author>
<name>Egor Tensin</name>
<email>egor@tensin.name</email>
</author>
<published>2026-09-21T17:19:05Z</published>
<link rel='alternate' type='text/html' href='http://git.tensin.name/cimple/commit/?id=588fd2262c2f65e237a5a4e4858e06b4b87aaae3'/>
<id>urn:sha1:588fd2262c2f65e237a5a4e4858e06b4b87aaae3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>finally, perfect .clang-format settings?</title>
<updated>2026-06-13T18:16:43Z</updated>
<author>
<name>Egor Tensin</name>
<email>egor@tensin.name</email>
</author>
<published>2026-06-13T18:16:43Z</published>
<link rel='alternate' type='text/html' href='http://git.tensin.name/cimple/commit/?id=d64e7bf3d93649b78231912f37606153e3d30665'/>
<id>urn:sha1:d64e7bf3d93649b78231912f37606153e3d30665</id>
<content type='text'>
</content>
</entry>
<entry>
<title>switch from tabs to spaces</title>
<updated>2026-06-13T17:51:04Z</updated>
<author>
<name>Egor Tensin</name>
<email>egor@tensin.name</email>
</author>
<published>2026-06-13T17:51:00Z</published>
<link rel='alternate' type='text/html' href='http://git.tensin.name/cimple/commit/?id=84262d9f69aa6730c69f464b5b4fb7f6030bf329'/>
<id>urn:sha1:84262d9f69aa6730c69f464b5b4fb7f6030bf329</id>
<content type='text'>
It was fun while it lasted, but I do believe that spaces are strictly
superior, and clang-format struggles with tabs while using advanced
configuration options.
</content>
</entry>
<entry>
<title>unify my .clang-format files</title>
<updated>2026-06-12T15:20:08Z</updated>
<author>
<name>Egor Tensin</name>
<email>egor@tensin.name</email>
</author>
<published>2026-06-12T15:20:08Z</published>
<link rel='alternate' type='text/html' href='http://git.tensin.name/cimple/commit/?id=1160cdb21e0b667269299853cb47a4aa88948dc3'/>
<id>urn:sha1:1160cdb21e0b667269299853cb47a4aa88948dc3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>switch to egor@tensin.name</title>
<updated>2023-12-12T20:29:42Z</updated>
<author>
<name>Egor Tensin</name>
<email>egor@tensin.name</email>
</author>
<published>2023-12-12T20:29:42Z</published>
<link rel='alternate' type='text/html' href='http://git.tensin.name/cimple/commit/?id=82c5f204346def706fdc7ee28a8e2570fb880369'/>
<id>urn:sha1:82c5f204346def706fdc7ee28a8e2570fb880369</id>
<content type='text'>
</content>
</entry>
<entry>
<title>switch to JSON-RPC as message format</title>
<updated>2023-07-17T22:38:50Z</updated>
<author>
<name>Egor Tensin</name>
<email>Egor.Tensin@gmail.com</email>
</author>
<published>2023-07-17T21:03:59Z</published>
<link rel='alternate' type='text/html' href='http://git.tensin.name/cimple/commit/?id=e05f02acd583797ceb449fc501d371d45a4293c1'/>
<id>urn:sha1:e05f02acd583797ceb449fc501d371d45a4293c1</id>
<content type='text'>
Instead of the weird `struct msg` I had, I switched to the JSON-RPC
format. It's basically the same, but has a well-defined semantics in
case of errors.
</content>
</entry>
<entry>
<title>event_loop: add event_loop_add_once</title>
<updated>2023-06-13T01:31:05Z</updated>
<author>
<name>Egor Tensin</name>
<email>Egor.Tensin@gmail.com</email>
</author>
<published>2023-06-13T01:31:05Z</published>
<link rel='alternate' type='text/html' href='http://git.tensin.name/cimple/commit/?id=1c0481869fc680ea19627d8babec6de9a6784eb7'/>
<id>urn:sha1:1c0481869fc680ea19627d8babec6de9a6784eb7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>event_loop: hide the API details</title>
<updated>2023-06-12T23:50:24Z</updated>
<author>
<name>Egor Tensin</name>
<email>Egor.Tensin@gmail.com</email>
</author>
<published>2023-06-12T23:50:24Z</published>
<link rel='alternate' type='text/html' href='http://git.tensin.name/cimple/commit/?id=5b58c9fd2880911aa926259d97a396e97f3d4313'/>
<id>urn:sha1:5b58c9fd2880911aa926259d97a396e97f3d4313</id>
<content type='text'>
</content>
</entry>
<entry>
<title>use signalfd to stop on SIGTERM</title>
<updated>2023-06-12T23:37:08Z</updated>
<author>
<name>Egor Tensin</name>
<email>Egor.Tensin@gmail.com</email>
</author>
<published>2023-06-11T23:42:08Z</published>
<link rel='alternate' type='text/html' href='http://git.tensin.name/cimple/commit/?id=48ce9170b057ddd2165b0239a92aede15849f7a3'/>
<id>urn:sha1:48ce9170b057ddd2165b0239a92aede15849f7a3</id>
<content type='text'>
Is this an overkill? I don't know.

The thing is, correctly intercepting SIGTERM (also SIGINT, etc.) is
incredibly tricky. For example, before this commit, my I/O loops in
server.c and worker.c were inherently racy.

This was immediately obvious if you tried to run the tests. The tests
(especially the Valgrind flavour) would run a worker, wait until it
prints a "Waiting for a new command" line, and try to kill it using
SIGTERM. The problem is, the global_stop_flag check could have already
been executed by the worker, and it would hang forever in recv().

The solution seems to be to use signalfd and select()/poll(). I've never
used either before, but it seems to work well enough - at least the very
same tests pass and don't hang now.
</content>
</entry>
<entry>
<title>rework server-worker communication</title>
<updated>2023-05-15T13:32:17Z</updated>
<author>
<name>Egor Tensin</name>
<email>Egor.Tensin@gmail.com</email>
</author>
<published>2023-05-15T13:31:33Z</published>
<link rel='alternate' type='text/html' href='http://git.tensin.name/cimple/commit/?id=7cd83e15139447156ca915ce2d9d19295c146d56'/>
<id>urn:sha1:7cd83e15139447156ca915ce2d9d19295c146d56</id>
<content type='text'>
OK, this is a major rework.

* tcp_server: connection threads are not detached anymore, the caller has
  to clean them up. This was done so that the server can clean up the
  threads cleanly.
* run_queue: simple refactoring, run_queue_entry is called just run now.
* server: worker threads are now killed when a run is assigned to a
  worker.
* worker: the connection to server is no longer persistent. A worker
  sends "new-worker", waits for a task, closes the connection, and when
  it's done, sends the "complete" message and waits for a new task.

This is supposed to improve resilience, since the worker-server
connections don't have to be maintained while the worker is doing a CI
run.
</content>
</entry>
</feed>
