<feed xmlns='http://www.w3.org/2005/Atom'>
<title>progs/discord-bot-skeleton.git/init, branch master</title>
<subtitle>turret'.s discord bot skeleton for C99</subtitle>
<link rel='alternate' type='text/html' href='http://git.turret.cyou/progs/discord-bot-skeleton.git/'/>
<entry>
<title>*: directory changes</title>
<updated>2024-03-30T21:04:45+00:00</updated>
<author>
<name>turret</name>
<email>turret@duck.com</email>
</author>
<published>2024-03-30T21:04:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.turret.cyou/progs/discord-bot-skeleton.git/commit/?id=80a67b7d20393a29aa5d2cb92197f3381be7fd96'/>
<id>80a67b7d20393a29aa5d2cb92197f3381be7fd96</id>
<content type='text'>
since this project is a skeleton and not meant to clutter up the code
that will actually consume the bot, i've opted to consolidate the
majority of files under a single directory and minimise extra files

*: move code to util/
*: move include files to include/dbs/
net: consolidate net functions into single file
config: remove config
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
since this project is a skeleton and not meant to clutter up the code
that will actually consume the bot, i've opted to consolidate the
majority of files under a single directory and minimise extra files

*: move code to util/
*: move include files to include/dbs/
net: consolidate net functions into single file
config: remove config
</pre>
</div>
</content>
</entry>
<entry>
<title>all: remove defunct prints</title>
<updated>2024-01-19T01:24:14+00:00</updated>
<author>
<name>turret</name>
<email>turret@duck.com</email>
</author>
<published>2024-01-19T01:24:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.turret.cyou/progs/discord-bot-skeleton.git/commit/?id=9a3149aba0214d514b57a53af6d019ae191ecab6'/>
<id>9a3149aba0214d514b57a53af6d019ae191ecab6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>init: apply .env files</title>
<updated>2024-01-19T01:01:13+00:00</updated>
<author>
<name>turret</name>
<email>turret@duck.com</email>
</author>
<published>2024-01-19T01:01:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.turret.cyou/progs/discord-bot-skeleton.git/commit/?id=bc6e03d73b4ff54f5562400c57ffa1e685ac971a'/>
<id>bc6e03d73b4ff54f5562400c57ffa1e685ac971a</id>
<content type='text'>
we apply .env files from both the current working directory and the
directory of the executable we're running from

very simple .env format, KEY=VALUE, comments prepended with # on first
character of line only.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
we apply .env files from both the current working directory and the
directory of the executable we're running from

very simple .env format, KEY=VALUE, comments prepended with # on first
character of line only.
</pre>
</div>
</content>
</entry>
<entry>
<title>init: minor optimisations</title>
<updated>2024-01-16T19:21:40+00:00</updated>
<author>
<name>turret</name>
<email>turret@duck.com</email>
</author>
<published>2024-01-16T19:21:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.turret.cyou/progs/discord-bot-skeleton.git/commit/?id=73d88e106fa0e85c5c2d100787fb640617b04798'/>
<id>73d88e106fa0e85c5c2d100787fb640617b04798</id>
<content type='text'>
use switch{case} instead of if statements for determining action upon
signal
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
use switch{case} instead of if statements for determining action upon
signal
</pre>
</div>
</content>
</entry>
<entry>
<title>misc: change RSL 2 -&gt; 1</title>
<updated>2024-01-15T03:19:06+00:00</updated>
<author>
<name>turret</name>
<email>turret@duck.com</email>
</author>
<published>2024-01-15T03:19:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.turret.cyou/progs/discord-bot-skeleton.git/commit/?id=5e46528be9b1f0efcb4b3abf2033d6a37432f248'/>
<id>5e46528be9b1f0efcb4b3abf2033d6a37432f248</id>
<content type='text'>
design choice since 1 &lt;&lt; n == pow(2,n)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
design choice since 1 &lt;&lt; n == pow(2,n)
</pre>
</div>
</content>
</entry>
<entry>
<title>subsys: clear signal handlers</title>
<updated>2024-01-15T03:15:09+00:00</updated>
<author>
<name>turret</name>
<email>turret@duck.com</email>
</author>
<published>2024-01-15T03:15:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.turret.cyou/progs/discord-bot-skeleton.git/commit/?id=b93f0d9b2ae44ab75d469adf72783030a636b2ea'/>
<id>b93f0d9b2ae44ab75d469adf72783030a636b2ea</id>
<content type='text'>
since we moved our signal handlers to be created before subsystems are
created, our new signal handlers (which namely blocks SIGTERM, used for
panicing) are passed on.  in order to restore full panic functionality,
we clear all signal blocks before passing execution to the subsystem
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
since we moved our signal handlers to be created before subsystems are
created, our new signal handlers (which namely blocks SIGTERM, used for
panicing) are passed on.  in order to restore full panic functionality,
we clear all signal blocks before passing execution to the subsystem
</pre>
</div>
</content>
</entry>
<entry>
<title>log: minor optimisations</title>
<updated>2024-01-15T03:14:09+00:00</updated>
<author>
<name>turret</name>
<email>turret@duck.com</email>
</author>
<published>2024-01-15T03:14:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.turret.cyou/progs/discord-bot-skeleton.git/commit/?id=4179b6eb0e4434dcac1f6bbf2e78709df964bf77'/>
<id>4179b6eb0e4434dcac1f6bbf2e78709df964bf77</id>
<content type='text'>
in panic, when killing process group, set pid to 0, where it gets our
pgid for us, using kernel optimisations, saving a trip to kernel land to
get the pgid ourselves
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
in panic, when killing process group, set pid to 0, where it gets our
pgid for us, using kernel optimisations, saving a trip to kernel land to
get the pgid ourselves
</pre>
</div>
</content>
</entry>
<entry>
<title>init: register signal blockers earlier</title>
<updated>2024-01-15T02:54:28+00:00</updated>
<author>
<name>turret</name>
<email>turret@duck.com</email>
</author>
<published>2024-01-15T02:54:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.turret.cyou/progs/discord-bot-skeleton.git/commit/?id=d4ba645474580e1da5a1297ceab40d5544bf53f0'/>
<id>d4ba645474580e1da5a1297ceab40d5544bf53f0</id>
<content type='text'>
prevents potential race condition where a subsystem can terminate before
we fully block SIGCHLD, causing SIGCHLD to be sent to init and having
our entire process terminated ungracefully.

prevents bash and family from sending "Terminated" due to our process
receiving SIGTERM during a panic, since we already exit in there and
it'd be queued up if we do receive one
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
prevents potential race condition where a subsystem can terminate before
we fully block SIGCHLD, causing SIGCHLD to be sent to init and having
our entire process terminated ungracefully.

prevents bash and family from sending "Terminated" due to our process
receiving SIGTERM during a panic, since we already exit in there and
it'd be queued up if we do receive one
</pre>
</div>
</content>
</entry>
<entry>
<title>init: modify panic termination sequence</title>
<updated>2024-01-15T01:50:24+00:00</updated>
<author>
<name>turret</name>
<email>turret@duck.com</email>
</author>
<published>2024-01-15T01:50:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.turret.cyou/progs/discord-bot-skeleton.git/commit/?id=bb357be604b64d489b6015f4c7466be51a748929'/>
<id>bb357be604b64d489b6015f4c7466be51a748929</id>
<content type='text'>
in log: we ensure we panic by killing our process group with SIGTERM,
raising it for ourselves, and exiting (if all else fails simply).
in init: we catch SIGTERM and exit with 0 if we get it, as bash (and
likely others) prints a nasty "Terminated" to stderr
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
in log: we ensure we panic by killing our process group with SIGTERM,
raising it for ourselves, and exiting (if all else fails simply).
in init: we catch SIGTERM and exit with 0 if we get it, as bash (and
likely others) prints a nasty "Terminated" to stderr
</pre>
</div>
</content>
</entry>
<entry>
<title>init: add random seed &amp; bug fixes</title>
<updated>2024-01-12T19:41:15+00:00</updated>
<author>
<name>turret</name>
<email>turret@duck.com</email>
</author>
<published>2024-01-12T19:41:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.turret.cyou/progs/discord-bot-skeleton.git/commit/?id=dfb0d84c8113629f1af0fa39519a38c4c48f7140'/>
<id>dfb0d84c8113629f1af0fa39519a38c4c48f7140</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
