<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/docker.git/pkg/process, branch master</title>
<subtitle>github.com: dotcloud/docker.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/'/>
<entry>
<title>pkg/system: remove deprecated IsProcessAlive, IsProcessZombie, KillProcess</title>
<updated>2023-05-06T14:36:17+00:00</updated>
<author>
<name>Sebastiaan van Stijn</name>
<email>github@gone.nl</email>
</author>
<published>2023-05-05T23:58:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=55608d838167e22010b666f929285efe26fba489'/>
<id>55608d838167e22010b666f929285efe26fba489</id>
<content type='text'>
These were deprecated in 9d5e754caad0af212545b352e19c3085d8df3281, which
is part of the v24.0.0 release, so we can remove it from master.

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These were deprecated in 9d5e754caad0af212545b352e19c3085d8df3281, which
is part of the v24.0.0 release, so we can remove it from master.

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pkg/process: Alive(): fix PID 0, -1, negative values</title>
<updated>2022-11-04T00:50:26+00:00</updated>
<author>
<name>Sebastiaan van Stijn</name>
<email>github@gone.nl</email>
</author>
<published>2022-10-15T21:14:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=735e25032659e4e46d8e1bf3c9fcc5b5ec785ec2'/>
<id>735e25032659e4e46d8e1bf3c9fcc5b5ec785ec2</id>
<content type='text'>
unix.Kill() does not produce an error for PID 0, -1. As a result, checking
process.Alive() would return "true" for both 0 and -1 on macOS (and previously
on Linux as well).

Let's shortcut these values to consider them "not alive", to prevent someone
trying to kill them.

A basic test was added to check the behavior.

Given that the intent of these functions is to handle single processes, this patch
also prevents 0 and negative values to be used.

From KILL(2): https://man7.org/linux/man-pages/man2/kill.2.html

    If pid is positive, then signal sig is sent to the process with
    the ID specified by pid.

    If pid equals 0, then sig is sent to every process in the process
    group of the calling process.

    If pid equals -1, then sig is sent to every process for which the
    calling process has permission to send signals, except for
    process 1 (init), but see below.

    If pid is less than -1, then sig is sent to every process in the
    process group whose ID is -pid.

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
unix.Kill() does not produce an error for PID 0, -1. As a result, checking
process.Alive() would return "true" for both 0 and -1 on macOS (and previously
on Linux as well).

Let's shortcut these values to consider them "not alive", to prevent someone
trying to kill them.

A basic test was added to check the behavior.

Given that the intent of these functions is to handle single processes, this patch
also prevents 0 and negative values to be used.

From KILL(2): https://man7.org/linux/man-pages/man2/kill.2.html

    If pid is positive, then signal sig is sent to the process with
    the ID specified by pid.

    If pid equals 0, then sig is sent to every process in the process
    group of the calling process.

    If pid equals -1, then sig is sent to every process for which the
    calling process has permission to send signals, except for
    process 1 (init), but see below.

    If pid is less than -1, then sig is sent to every process in the
    process group whose ID is -pid.

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pkg/pidfile, pkg/process: use single implementation for process alive</title>
<updated>2022-11-04T00:50:26+00:00</updated>
<author>
<name>Sebastiaan van Stijn</name>
<email>github@gone.nl</email>
</author>
<published>2022-10-15T13:37:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=55d15e9d05262a674d37ce96586bf84ce1f04013'/>
<id>55d15e9d05262a674d37ce96586bf84ce1f04013</id>
<content type='text'>
Using the implementation from pkg/pidfile for windows, as that implementation
looks to be handling more cases to check if a process is still alive (or to be
considered alive).

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using the implementation from pkg/pidfile for windows, as that implementation
looks to be handling more cases to check if a process is still alive (or to be
considered alive).

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>move pkg/system: process to a separate package</title>
<updated>2022-11-04T00:50:23+00:00</updated>
<author>
<name>Sebastiaan van Stijn</name>
<email>github@gone.nl</email>
</author>
<published>2022-10-15T13:10:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=9d5e754caad0af212545b352e19c3085d8df3281'/>
<id>9d5e754caad0af212545b352e19c3085d8df3281</id>
<content type='text'>
Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</pre>
</div>
</content>
</entry>
</feed>
