website

My personal website
git clone git://git.ckyln.com/website
Log | Files | Refs

commit ac0bfa6dc1144ab171f1975c6cad99986e00bc03
parent 4d020c12134a3629f545538cfaf543419f14007e
Author: Cem Keylan <cem@ckyln.com>
Date:   Fri,  2 Oct 2020 21:14:51 +0300

update

Diffstat:
Mdocs/blog.html | 1+
Mdocs/blog.txt | 1+
Adocs/blog/20201002-reimplementing-sysmgr-in-c.html | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adocs/blog/20201002-reimplementing-sysmgr-in-c.txt | 27+++++++++++++++++++++++++++
Mdocs/index.html | 30++++++++++++++++++++++++++++++
Mdocs/index.txt | 34++++++++++++++++++++++++++++++++++
Mdocs/rss.xml | 31++++++++++++++++++++++++++++++-
Msrc/blog.md | 1+
Asrc/blog/20201002-reimplementing-sysmgr-in-c.md | 27+++++++++++++++++++++++++++
Msrc/index.md | 34++++++++++++++++++++++++++++++++++
Msrc/rss.xml | 31++++++++++++++++++++++++++++++-
11 files changed, 286 insertions(+), 2 deletions(-)

diff --git a/docs/blog.html b/docs/blog.html @@ -43,6 +43,7 @@ <h2>Blog Index</h2> <ul> +<li>Oct 02 2020 - <a href="/blog/20201002-reimplementing-sysmgr-in-c.html">Reimplementing <code>sysmgr</code> in C</a></li> <li>Sep 08 2020 - <a href="/blog/20200908-trust-in-distributed-environments.html">Trust in Distributed Environments</a></li> <li>Aug 28 2020 - <a href="/blog/20200828-wpa-add-script.html">wpa_add script</a></li> <li>Aug 28 2020 - <a href="/blog/20200828-static-linking.html">Static linking</a></li> diff --git a/docs/blog.txt b/docs/blog.txt @@ -1,6 +1,7 @@ Blog Index -------------------------------------------------------------------------------- +* Oct 02 2020 - [Reimplementing `sysmgr` in C](/blog/20201002-reimplementing-sysmgr-in-c.html) * Sep 08 2020 - [Trust in Distributed Environments](/blog/20200908-trust-in-distributed-environments.html) * Aug 28 2020 - [wpa_add script](/blog/20200828-wpa-add-script.html) * Aug 28 2020 - [Static linking](/blog/20200828-static-linking.html) diff --git a/docs/blog/20201002-reimplementing-sysmgr-in-c.html b/docs/blog/20201002-reimplementing-sysmgr-in-c.html @@ -0,0 +1,71 @@ +<!DOCTYPE HTML> +<html lan=en> + <head> + <title>Reimplementing `sysmgr` in C | Cem's Website</title> + <meta charset="utf-8"> + <meta name="Description" content="Cem Keylan's Website"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <style> + html {font-family:monospace;font-size:16px;color:#282a36;} + body { + width: 90%; + max-width: 1050px; + margin-left: auto; + margin-right: auto; + margin-top: 20px; + overflow: none; + overflow-y: scroll; + padding-right: 10px; + padding-left: 10px; + } + a{text-decoration:none;font-weight:bold;color:#282a36;} + a:hover{text-decoration:underline;} + @media (prefers-color-scheme: dark) { + html {color: white;background:#282a36;} + a{color:white;} + } + </style> + <link rel="stylesheet" href="/static/syntax.css"> + <script src="/static/highlight.pack.js"></script> + <script>hljs.initHighlightingOnLoad();</script> + </head> + <body> + <div class="header"> + <nav> + <a href='/'>index</a> | + <a href="/software.html">software</a> | + <a href="/blog.html">blog</a> | + <a href="/contact.html">contact</a> | + </nav> + </div> + <hr> + <p> +<h1>Reimplementing <code>sysmgr</code> in C</h1> + +<p>For a while, I have been thinking about implementing <a href="https://git.ckyln.com/sysmgr">sysmgr</a> in C. I started +thinking about the inefficiencies of sysmgr. POSIX sh isn&rsquo;t particularly +designed to have ultimate control over child processes. There are basic job +management features that are <em>just enough</em> for sysmgr to do its job. The +biggest pain is having to use tools like <code>sleep(1)</code> and <code>kill(1)</code>. Calling +sleep every second, and using the kill command to check whether a process is +alive or not is extremely inefficient. Some shells <em>do</em> include these commands +built-in, but it isn&rsquo;t specified by POSIX, but one should never take this as +granted.</p> + +<p>Lately, I have been adding C utilities to sysmgr to make it more efficient. This +defeats the initial purpose of sysmgr, being a service manager in pure POSIX +shell. My main purpose, however, is making sysmgr efficient and simplistic. It +mostly imitates <code>runit</code> without dealing with all the complexity of the +over-thinked <code>supervise</code> directory, nor the logging stuff. Most of these can be +handled by the service script itself anyway. That&rsquo;s why instead of this ugly +C/POSIX sh hybrid, I decided to implement it all in C.</p> + +<p>I am not a C expert or anything, I am learning a lot as I am writing the +program. I want it to be C99 and portable (for BSD). It&rsquo;s currently not +functional at all, but, you can see its current state <a href="https://git.ckyln.com/sm">here</a>.</p> + </p> + <a href="/blog/20201002-reimplementing-sysmgr-in-c.txt">This page in plain-text</a> + <hr> + <p class=footer>Copyright © 2019-2020 Cem Keylan</p> + </body> +</html> diff --git a/docs/blog/20201002-reimplementing-sysmgr-in-c.txt b/docs/blog/20201002-reimplementing-sysmgr-in-c.txt @@ -0,0 +1,27 @@ +Reimplementing `sysmgr` in C +================================================================================ + +For a while, I have been thinking about implementing [sysmgr] in C. I started +thinking about the inefficiencies of sysmgr. POSIX sh isn't particularly +designed to have ultimate control over child processes. There are basic job +management features that are _just enough_ for sysmgr to do its job. The +biggest pain is having to use tools like `sleep(1)` and `kill(1)`. Calling +sleep every second, and using the kill command to check whether a process is +alive or not is extremely inefficient. Some shells _do_ include these commands +built-in, but it isn't specified by POSIX, but one should never take this as +granted. + +Lately, I have been adding C utilities to sysmgr to make it more efficient. This +defeats the initial purpose of sysmgr, being a service manager in pure POSIX +shell. My main purpose, however, is making sysmgr efficient and simplistic. It +mostly imitates `runit` without dealing with all the complexity of the +over-thinked `supervise` directory, nor the logging stuff. Most of these can be +handled by the service script itself anyway. That's why instead of this ugly +C/POSIX sh hybrid, I decided to implement it all in C. + +I am not a C expert or anything, I am learning a lot as I am writing the +program. I want it to be C99 and portable (for BSD). It's currently not +functional at all, but, you can see its current state [here]. + +[sysmgr]: https://git.ckyln.com/sysmgr +[here]: https://git.ckyln.com/sm diff --git a/docs/index.html b/docs/index.html @@ -59,6 +59,36 @@ able to view this site in your favourite pager! In your terminal simply type:</p <hr /> +<h1>Reimplementing <code>sysmgr</code> in C</h1> + +<p><a href="/blog/20201002-reimplementing-sysmgr-in-c.html">Permalink</a></p> + +<p>Date: Oct 02 2020</p> + +<p>For a while, I have been thinking about implementing <a href="https://git.ckyln.com/sysmgr">sysmgr</a> in C. I started +thinking about the inefficiencies of sysmgr. POSIX sh isn&rsquo;t particularly +designed to have ultimate control over child processes. There are basic job +management features that are <em>just enough</em> for sysmgr to do its job. The +biggest pain is having to use tools like <code>sleep(1)</code> and <code>kill(1)</code>. Calling +sleep every second, and using the kill command to check whether a process is +alive or not is extremely inefficient. Some shells <em>do</em> include these commands +built-in, but it isn&rsquo;t specified by POSIX, but one should never take this as +granted.</p> + +<p>Lately, I have been adding C utilities to sysmgr to make it more efficient. This +defeats the initial purpose of sysmgr, being a service manager in pure POSIX +shell. My main purpose, however, is making sysmgr efficient and simplistic. It +mostly imitates <code>runit</code> without dealing with all the complexity of the +over-thinked <code>supervise</code> directory, nor the logging stuff. Most of these can be +handled by the service script itself anyway. That&rsquo;s why instead of this ugly +C/POSIX sh hybrid, I decided to implement it all in C.</p> + +<p>I am not a C expert or anything, I am learning a lot as I am writing the +program. I want it to be C99 and portable (for BSD). It&rsquo;s currently not +functional at all, but, you can see its current state <a href="https://git.ckyln.com/sm">here</a>.</p> + +<hr /> + <h1>Trust in Distributed Environments</h1> <p><a href="/blog/20200908-trust-in-distributed-environments.html">Permalink</a></p> diff --git a/docs/index.txt b/docs/index.txt @@ -19,6 +19,40 @@ able to view this site in your favourite pager! In your terminal simply type: ******************************************************************************** +Reimplementing `sysmgr` in C +================================================================================ +[Permalink](/blog/20201002-reimplementing-sysmgr-in-c.html) + +Date: Oct 02 2020 + + +For a while, I have been thinking about implementing [sysmgr] in C. I started +thinking about the inefficiencies of sysmgr. POSIX sh isn't particularly +designed to have ultimate control over child processes. There are basic job +management features that are _just enough_ for sysmgr to do its job. The +biggest pain is having to use tools like `sleep(1)` and `kill(1)`. Calling +sleep every second, and using the kill command to check whether a process is +alive or not is extremely inefficient. Some shells _do_ include these commands +built-in, but it isn't specified by POSIX, but one should never take this as +granted. + +Lately, I have been adding C utilities to sysmgr to make it more efficient. This +defeats the initial purpose of sysmgr, being a service manager in pure POSIX +shell. My main purpose, however, is making sysmgr efficient and simplistic. It +mostly imitates `runit` without dealing with all the complexity of the +over-thinked `supervise` directory, nor the logging stuff. Most of these can be +handled by the service script itself anyway. That's why instead of this ugly +C/POSIX sh hybrid, I decided to implement it all in C. + +I am not a C expert or anything, I am learning a lot as I am writing the +program. I want it to be C99 and portable (for BSD). It's currently not +functional at all, but, you can see its current state [here]. + +[sysmgr]: https://git.ckyln.com/sysmgr +[here]: https://git.ckyln.com/sm + +******************************************************************************** + Trust in Distributed Environments ================================================================================ [Permalink](/blog/20200908-trust-in-distributed-environments.html) diff --git a/docs/rss.xml b/docs/rss.xml @@ -9,7 +9,36 @@ <description>Personal blog/website on Linux/tech/nerdy stuff</description> <link>https://cemkeylan.com</link> <atom:link href="https://cemkeylan.com/rss.xml" rel="self" type="application/rss+xml" /> - <lastBuildDate>Tue Sep 29 2020 21:00</lastBuildDate> + <lastBuildDate>Fri Oct 02 2020 18:00</lastBuildDate> +<item> +<title>Reimplementing `sysmgr` in C</title> +<pubDate>Fri, 02 Oct 2020</pubDate> +<dc:creator>Cem Keylan</dc:creator> +<link>https://cemkeylan.com/blog/20201002-reimplementing-sysmgr-in-c.html</link> +<description>&lt;h1&gt;Reimplementing &lt;code&gt;sysmgr&lt;/code&gt; in C&lt;/h1&gt; + +&lt;p&gt;For a while, I have been thinking about implementing &lt;a href=&quot;https://git.ckyln.com/sysmgr&quot;&gt;sysmgr&lt;/a&gt; in C. I started +thinking about the inefficiencies of sysmgr. POSIX sh isn&amp;rsquo;t particularly +designed to have ultimate control over child processes. There are basic job +management features that are &lt;em&gt;just enough&lt;/em&gt; for sysmgr to do its job. The +biggest pain is having to use tools like &lt;code&gt;sleep(1)&lt;/code&gt; and &lt;code&gt;kill(1)&lt;/code&gt;. Calling +sleep every second, and using the kill command to check whether a process is +alive or not is extremely inefficient. Some shells &lt;em&gt;do&lt;/em&gt; include these commands +built-in, but it isn&amp;rsquo;t specified by POSIX, but one should never take this as +granted.&lt;/p&gt; + +&lt;p&gt;Lately, I have been adding C utilities to sysmgr to make it more efficient. This +defeats the initial purpose of sysmgr, being a service manager in pure POSIX +shell. My main purpose, however, is making sysmgr efficient and simplistic. It +mostly imitates &lt;code&gt;runit&lt;/code&gt; without dealing with all the complexity of the +over-thinked &lt;code&gt;supervise&lt;/code&gt; directory, nor the logging stuff. Most of these can be +handled by the service script itself anyway. That&amp;rsquo;s why instead of this ugly +C/POSIX sh hybrid, I decided to implement it all in C.&lt;/p&gt; + +&lt;p&gt;I am not a C expert or anything, I am learning a lot as I am writing the +program. I want it to be C99 and portable (for BSD). It&amp;rsquo;s currently not +functional at all, but, you can see its current state &lt;a href=&quot;https://git.ckyln.com/sm&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</description> +</item> <item> <title>Trust in Distributed Environments</title> <pubDate>Tue, 08 Sep 2020</pubDate> diff --git a/src/blog.md b/src/blog.md @@ -1,6 +1,7 @@ Blog Index -------------------------------------------------------------------------------- +* Oct 02 2020 - [Reimplementing `sysmgr` in C](/blog/20201002-reimplementing-sysmgr-in-c.html) * Sep 08 2020 - [Trust in Distributed Environments](/blog/20200908-trust-in-distributed-environments.html) * Aug 28 2020 - [wpa_add script](/blog/20200828-wpa-add-script.html) * Aug 28 2020 - [Static linking](/blog/20200828-static-linking.html) diff --git a/src/blog/20201002-reimplementing-sysmgr-in-c.md b/src/blog/20201002-reimplementing-sysmgr-in-c.md @@ -0,0 +1,27 @@ +Reimplementing `sysmgr` in C +================================================================================ + +For a while, I have been thinking about implementing [sysmgr] in C. I started +thinking about the inefficiencies of sysmgr. POSIX sh isn't particularly +designed to have ultimate control over child processes. There are basic job +management features that are _just enough_ for sysmgr to do its job. The +biggest pain is having to use tools like `sleep(1)` and `kill(1)`. Calling +sleep every second, and using the kill command to check whether a process is +alive or not is extremely inefficient. Some shells _do_ include these commands +built-in, but it isn't specified by POSIX, but one should never take this as +granted. + +Lately, I have been adding C utilities to sysmgr to make it more efficient. This +defeats the initial purpose of sysmgr, being a service manager in pure POSIX +shell. My main purpose, however, is making sysmgr efficient and simplistic. It +mostly imitates `runit` without dealing with all the complexity of the +over-thinked `supervise` directory, nor the logging stuff. Most of these can be +handled by the service script itself anyway. That's why instead of this ugly +C/POSIX sh hybrid, I decided to implement it all in C. + +I am not a C expert or anything, I am learning a lot as I am writing the +program. I want it to be C99 and portable (for BSD). It's currently not +functional at all, but, you can see its current state [here]. + +[sysmgr]: https://git.ckyln.com/sysmgr +[here]: https://git.ckyln.com/sm diff --git a/src/index.md b/src/index.md @@ -19,6 +19,40 @@ able to view this site in your favourite pager! In your terminal simply type: ******************************************************************************** +Reimplementing `sysmgr` in C +================================================================================ +[Permalink](/blog/20201002-reimplementing-sysmgr-in-c.html) + +Date: Oct 02 2020 + + +For a while, I have been thinking about implementing [sysmgr] in C. I started +thinking about the inefficiencies of sysmgr. POSIX sh isn't particularly +designed to have ultimate control over child processes. There are basic job +management features that are _just enough_ for sysmgr to do its job. The +biggest pain is having to use tools like `sleep(1)` and `kill(1)`. Calling +sleep every second, and using the kill command to check whether a process is +alive or not is extremely inefficient. Some shells _do_ include these commands +built-in, but it isn't specified by POSIX, but one should never take this as +granted. + +Lately, I have been adding C utilities to sysmgr to make it more efficient. This +defeats the initial purpose of sysmgr, being a service manager in pure POSIX +shell. My main purpose, however, is making sysmgr efficient and simplistic. It +mostly imitates `runit` without dealing with all the complexity of the +over-thinked `supervise` directory, nor the logging stuff. Most of these can be +handled by the service script itself anyway. That's why instead of this ugly +C/POSIX sh hybrid, I decided to implement it all in C. + +I am not a C expert or anything, I am learning a lot as I am writing the +program. I want it to be C99 and portable (for BSD). It's currently not +functional at all, but, you can see its current state [here]. + +[sysmgr]: https://git.ckyln.com/sysmgr +[here]: https://git.ckyln.com/sm + +******************************************************************************** + Trust in Distributed Environments ================================================================================ [Permalink](/blog/20200908-trust-in-distributed-environments.html) diff --git a/src/rss.xml b/src/rss.xml @@ -9,7 +9,36 @@ <description>Personal blog/website on Linux/tech/nerdy stuff</description> <link>https://cemkeylan.com</link> <atom:link href="https://cemkeylan.com/rss.xml" rel="self" type="application/rss+xml" /> - <lastBuildDate>Tue Sep 29 2020 21:00</lastBuildDate> + <lastBuildDate>Fri Oct 02 2020 18:00</lastBuildDate> +<item> +<title>Reimplementing `sysmgr` in C</title> +<pubDate>Fri, 02 Oct 2020</pubDate> +<dc:creator>Cem Keylan</dc:creator> +<link>https://cemkeylan.com/blog/20201002-reimplementing-sysmgr-in-c.html</link> +<description>&lt;h1&gt;Reimplementing &lt;code&gt;sysmgr&lt;/code&gt; in C&lt;/h1&gt; + +&lt;p&gt;For a while, I have been thinking about implementing &lt;a href=&quot;https://git.ckyln.com/sysmgr&quot;&gt;sysmgr&lt;/a&gt; in C. I started +thinking about the inefficiencies of sysmgr. POSIX sh isn&amp;rsquo;t particularly +designed to have ultimate control over child processes. There are basic job +management features that are &lt;em&gt;just enough&lt;/em&gt; for sysmgr to do its job. The +biggest pain is having to use tools like &lt;code&gt;sleep(1)&lt;/code&gt; and &lt;code&gt;kill(1)&lt;/code&gt;. Calling +sleep every second, and using the kill command to check whether a process is +alive or not is extremely inefficient. Some shells &lt;em&gt;do&lt;/em&gt; include these commands +built-in, but it isn&amp;rsquo;t specified by POSIX, but one should never take this as +granted.&lt;/p&gt; + +&lt;p&gt;Lately, I have been adding C utilities to sysmgr to make it more efficient. This +defeats the initial purpose of sysmgr, being a service manager in pure POSIX +shell. My main purpose, however, is making sysmgr efficient and simplistic. It +mostly imitates &lt;code&gt;runit&lt;/code&gt; without dealing with all the complexity of the +over-thinked &lt;code&gt;supervise&lt;/code&gt; directory, nor the logging stuff. Most of these can be +handled by the service script itself anyway. That&amp;rsquo;s why instead of this ugly +C/POSIX sh hybrid, I decided to implement it all in C.&lt;/p&gt; + +&lt;p&gt;I am not a C expert or anything, I am learning a lot as I am writing the +program. I want it to be C99 and portable (for BSD). It&amp;rsquo;s currently not +functional at all, but, you can see its current state &lt;a href=&quot;https://git.ckyln.com/sm&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</description> +</item> <item> <title>Trust in Distributed Environments</title> <pubDate>Tue, 08 Sep 2020</pubDate>