<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/win32/process.c, branch waitfor</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=waitfor</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=waitfor'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2026-07-15T15:26:35+00:00</updated>
<entry>
<title>win32: code shrink procps_scan()</title>
<updated>2026-07-15T15:26:35+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-07-15T15:26:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=850b56c8a4c565bcf37b396580ca90e99da5d754'/>
<id>urn:sha1:850b56c8a4c565bcf37b396580ca90e99da5d754</id>
<content type='text'>
The principal change is to replace four separate arrays (one for
pids and three for time values) with a single array of structs.

There are some other minor adjustments.

Saves 96-144 bytes.

(GitHub PR #609)

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
</content>
</entry>
<entry>
<title>fix: procps_scan: do not confirm a process to be parent if either creation time is unknown.</title>
<updated>2026-07-15T14:45:39+00:00</updated>
<author>
<name>Shun Zi</name>
<email>20991618+shunf4@users.noreply.github.com</email>
</author>
<published>2026-07-09T17:39:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=aeb72f4daf947013c40be50267405d9204bb5b82'/>
<id>urn:sha1:aeb72f4daf947013c40be50267405d9204bb5b82</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix: procps_scan: compare process creation times to ensure ppid is real</title>
<updated>2026-07-15T14:45:39+00:00</updated>
<author>
<name>shunf4</name>
<email>shun1048576@gmail.com</email>
</author>
<published>2026-07-09T16:42:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=f5b004e242bcbe931454ff33c62e45ea1601c5de'/>
<id>urn:sha1:f5b004e242bcbe931454ff33c62e45ea1601c5de</id>
<content type='text'>
Windows aggressively reuses PIDs of exited processes. When a new irrelevant process gets assigned the former PID of the parent of an orphaned process, `pkill -P`, `pgrep -P`, `ps -o ppid` sees the new process as the parent of the orphaned process, and PPID of the orphan is no longer 1. So in theory, all `pkill -P`, `pgrep -P` calls are potentially dangerous and possible to kill an innocent process which outlives its parent.

This issue is already discussed in various Internet communities:

- https://stackoverflow.com/questions/6593003/how-can-i-reliably-check-whether-one-windows-process-is-the-parent-of-another-in

- https://web.archive.org/web/20140701081232/https://www.sapphiresteel.com/Blog/Killing-Trees-the-Windows-way

Comparing process creation times seems a feasible mitigation that should almost always work (though not theoretically sound).

The executable is added 512 bytes after the patch.
</content>
</entry>
<entry>
<title>win32: avoid problems with forward slashes in path to cmd.exe</title>
<updated>2026-06-06T09:55:46+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-06-06T09:55:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=acc0d23bce6458cff1b0716c64e0821a8230815b'/>
<id>urn:sha1:acc0d23bce6458cff1b0716c64e0821a8230815b</id>
<content type='text'>
Running 'C:/Windows/System32/cmd.exe' from the shell was found to
have the unxpected result of creating the directory '.exe'.  This
is due to the weirdness of cmd.exe.

A similar problem with batch files was already being handled in
`spawnveq()` by converting forward slashes to backslashes in the
path to the executable file.  Doing this unconditionally will fix
the above case too.

(GitHub issue #598)

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
</content>
</entry>
<entry>
<title>win32: add FAST_FUNC annotations</title>
<updated>2026-05-04T10:51:00+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-05-04T10:51:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=f26b970e4d22e1b2e3ca6209c3412fa0f683d953'/>
<id>urn:sha1:f26b970e4d22e1b2e3ca6209c3412fa0f683d953</id>
<content type='text'>
I've been far too lax in applying FAST_FUNC annotations.  These
can make function calls smaller and faster, but only on 32-bit
systems and for non-static, non-variadic functions with non-void
arguments.

Saves 4680 bytes in the 32-bit build; 64-bit builds are unaffected.
</content>
</entry>
<entry>
<title>Add crond and crontab (#561)</title>
<updated>2026-05-03T08:53:07+00:00</updated>
<author>
<name>mbartlett21</name>
<email>29034492+mbartlett21@users.noreply.github.com</email>
</author>
<published>2026-05-03T08:53:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=c23112c3a0bbf1d07f03b3c07fe96b5b4c5271f1'/>
<id>urn:sha1:c23112c3a0bbf1d07f03b3c07fe96b5b4c5271f1</id>
<content type='text'>
* Enable crontab

* Enable crond

* Allow sendmail to be used in crond

This also adds another option to the mingw_popen_fd function to capture
stderr as well. And also added the options to support WNOHANG as well
as an unused status in mingw_wait3

* Check current uid when running crond

* Only show tail for mailto jobs

* Use system drive for cron

* crond: add missing feature check

* crond: use spawn_detach for background operation</content>
</entry>
<entry>
<title>ash: allow 'times' built-in to report process timing</title>
<updated>2026-04-12T10:49:29+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-04-12T10:49:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=333c65ca71f1acb2cc6cd3920a346bb8ddf82dec'/>
<id>urn:sha1:333c65ca71f1acb2cc6cd3920a346bb8ddf82dec</id>
<content type='text'>
Move existing code which obtains process execution times into a
separate function.  Use it to allow times(2) to report execution
times for the current process, though not child execution times.

Change TICKS_PER_SECOND from 100 to 1000 to increase the displayed
resolution of process times (though the measured resolution may
well be less than this).

Adds 48-80 bytes.

(GitHub issue #574)
</content>
</entry>
<entry>
<title>ash: allow execution of busybox-w32 binary without extension</title>
<updated>2026-02-25T09:33:36+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-02-25T09:33:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=35e590816a844e3ccc707c841b756e83987d09eb'/>
<id>urn:sha1:35e590816a844e3ccc707c841b756e83987d09eb</id>
<content type='text'>
If the busybox-w32 binary didn't have an extension the shell was
unable to spawn itself:

   $ ls -l busybox
   -rwxrwxr-x    1 rmy      rmy         661006 Feb 25 09:37 busybox
   $ ./busybox sh
   $ ls
   sh: unable to spawn shell

This happened because the shell used spawnve() from the C runtime
to execute itself.  Microsoft insists on trying to add an extension
to the name of the binary unless it has an explicit '.' as its
last character.

Use the internal spawnveq() instead, as it handles various quirks
like the above.

Adds 16-32 bytes.

(GitHub issue #566)
</content>
</entry>
<entry>
<title>Allow building with older mingw-w64/gcc</title>
<updated>2025-10-01T07:38:49+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2025-10-01T07:38:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=86d0b4937c77beba0c5b042b833f08afa61ee728'/>
<id>urn:sha1:86d0b4937c77beba0c5b042b833f08afa61ee728</id>
<content type='text'>
Recent versions of busybox-w32 rely on features which are only
available in contemporary versions of mingw-w64 and gcc.

Allow building on somewhat older toolchains.

(GitHub issue #527)
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2025-08-15T08:00:13+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2025-08-15T08:00:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=01ff9c492111cf7d51ad074629d6e72bc69fc149'/>
<id>urn:sha1:01ff9c492111cf7d51ad074629d6e72bc69fc149</id>
<content type='text'>
</content>
</entry>
</feed>
