commit ac0bfa6dc1144ab171f1975c6cad99986e00bc03
parent 4d020c12134a3629f545538cfaf543419f14007e
Author: Cem Keylan <cem@ckyln.com>
Date: Fri, 2 Oct 2020 21:14:51 +0300
update
Diffstat:
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’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’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’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’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’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’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’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’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><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></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><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></description>
+</item>
<item>
<title>Trust in Distributed Environments</title>
<pubDate>Tue, 08 Sep 2020</pubDate>