<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/win32/mingw.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: 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: workaround for overflow of 8.3 short name (2)</title>
<updated>2026-07-14T07:49:19+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-07-14T07:49:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=4274fef3f9f8470810110e134622f099e44de0a3'/>
<id>urn:sha1:4274fef3f9f8470810110e134622f099e44de0a3</id>
<content type='text'>
Replace a call to 'FindNextFileA()' in 'get_reparse_tag()'.

This has no effect on the standard builds.  Builds with the UTF-8
manifest included save 4-8 bytes as this removes the only remaining
call to 'FindNextFileA()'.

(GitHub issue #506)

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
</content>
</entry>
<entry>
<title>win32: workaround for overflow of 8.3 short name</title>
<updated>2026-07-13T15:02:56+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-07-13T15:02:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=5f76295bd1ac36ad512ff234877241dd2626b6a4'/>
<id>urn:sha1:5f76295bd1ac36ad512ff234877241dd2626b6a4</id>
<content type='text'>
In certain circumstances 'FindNextFileA()' can fail because the
legacy DOS 8.3 short name doesn't fit in the buffer supplied.

This can be avoided by using 'FindFirstFileExA()' instead, but
with a setting that isn't available on Windows XP.

- The problem doesn't arise in the standard 32 and 64 bit builds,
  so no change is required.

- Builds with full Unicode support target platforms which have the
  required setting.  They can use 'FindFirstFileExA()' unconditionally,
  at the cost of 36-56 bytes.

- Builds which include the UTF-8 manifest but which are allowed
  to run on systems prior to Windows 10 need to check whether they
  need to call 'FindFirstFileExA()' at runtime.  This adds 100 bytes.

(GitHub issue #506)

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
</content>
</entry>
<entry>
<title>rpm: respect BB_SYSTEMROOT</title>
<updated>2026-07-02T12:11:37+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-07-02T12:11:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=882815f8740fe0c42ff53bc7df8f9bfb750d6944'/>
<id>urn:sha1:882815f8740fe0c42ff53bc7df8f9bfb750d6944</id>
<content type='text'>
Update the 'rpm' applet so it also respects the BB_SYSTEMROOT
environment variable.

Replace chdir_system_drive() with xchdir_system_drive(), which
exits on failure to change directory.

Saves 32-36 bytes.

(GitHub PR #603)

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
</content>
</entry>
<entry>
<title>sync: handle certain edge cases</title>
<updated>2026-06-23T07:05:34+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-06-23T07:05:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=621339899c227e3b1247754f5f96037be2eebb00'/>
<id>urn:sha1:621339899c227e3b1247754f5f96037be2eebb00</id>
<content type='text'>
Recent changes to our mntent routines added support for Windows
volume names.  If such a name is available use it in our sync(2)
implementation to flush file buffers.  Failing that, use the drive
letter as before.

This handles edge cases where only one or other of the volume name
or drive letter is available.

Adds 32 bytes.

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
</content>
</entry>
<entry>
<title>Fix the flags for stat (again) (#601)</title>
<updated>2026-06-22T10:36:43+00:00</updated>
<author>
<name>mbartlett21</name>
<email>29034492+mbartlett21@users.noreply.github.com</email>
</author>
<published>2026-06-22T10:36:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=b37062304275debaadf71c9f3e5f4e9076f5eda6'/>
<id>urn:sha1:b37062304275debaadf71c9f3e5f4e9076f5eda6</id>
<content type='text'>
* Revert "find: reset stat(2) flags before terminating"

This reverts commit 228ee18fbe8cf408440e7bbe91db4ef201312983.

* test: fix flags for stat with NOFORK

test is a NOFORK applet, so the flags under mingw_stat may not have been
reset before calling it. We have it so it also restores the flags after,
since it could be called in the middle of another applet.

This also needed a way to retrieve the flags, so they are just done
through the return value.

* Add comments about not having to restore flags

Just for future reference

* lineedit: use new flag restoring

* win32: simplify mingw_access calling

Since we now have a way to get the previous flags, mingw_access can be
changed to ignore any stat flags

* stat: comments from PR

Adds 32 bytes.</content>
</entry>
<entry>
<title>win32: Unix-like support for volume mounts</title>
<updated>2026-06-15T11:42:54+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-06-15T11:26:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=862f87a8725d5cc9693021066869e94512d5d8e1'/>
<id>urn:sha1:862f87a8725d5cc9693021066869e94512d5d8e1</id>
<content type='text'>
Add code to distinguish between volume mount points and junctions.
Volume mount points are to be treated like directries while
junctions are like symlinks.

Update the 'mntent' functions to scan drive letters first, then
volume names and their associated mount points.  By default the
filesystem is returned as a drive letter, if possible, though
the volume name is also returned.

The function 'find_mount_point()' has been updated to use the
new 'mntent' routines.

Adds 772-803 bytes.

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
</content>
</entry>
<entry>
<title>win32: extend handling of virtual disks</title>
<updated>2026-06-08T13:02:15+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-06-08T13:02:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=1313ab2691128c2255ac1ccdeea7021dbb9b4fe4'/>
<id>urn:sha1:1313ab2691128c2255ac1ccdeea7021dbb9b4fe4</id>
<content type='text'>
Commit 62e4c5d29 (win32: special treatment for virtual hard disk)
added special treatment for mount points associated with virtual
hard disks.  One statement made there was incorrect:  a VHD without
a drive letter containing no files *does* have a '.' directory.
The error message for this case was misleading.

The changes made to handle VHDs were insufficiently general:

- lstat(2) only resolved symlinks for the explicit path '.'.
  It should also do so for paths of the form 'path/to/.'.

- opendir(3) only generated entries for '.' and '..' directories
  when FindFirstFileA() failed for the path '.'.  It should also
  do so for any path which resolves to a volume mount point.

Make the necessary changes.

Adds 64-80 bytes.

(GitHub issue #597)

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
</content>
</entry>
<entry>
<title>win32: special treatment for virtual hard disk</title>
<updated>2026-06-07T14:23:48+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-06-07T14:23:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=62e4c5d291600a5f537d225ffdf22544bc74c8be'/>
<id>urn:sha1:62e4c5d291600a5f537d225ffdf22544bc74c8be</id>
<content type='text'>
Virtual hard disks (VHD) without a drive letter gave incorrect
results in 'ls' and 'stat'.  There were two problems:

- If the disk is empty it doesn't have a '.' directory.

- If it contains files the '.' directory is actually the mount
  point, which looks like a symbolic link and can't be opened
  as a directory.

Modify our 'stat(2)' and 'opendir(3)' implementations to handle
these quirks.

Adds 78-80 bytes.

(GitHub issue #597)

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
</content>
</entry>
</feed>
