ModernUO/Projects
Kamron Batman 577a4da60c
fix: restart relaunches correctly when the server path contains a space (#2704)
`Core.DoKill(true)` built the relaunch command line by putting the assembly path into a raw argument string without quotes, so `dotnet` split it at the first space. That breaks `restart`, `AutoRestart` and `CrashGuard` recovery for any server installed under a path with a space.

- Pass the assembly path through `ProcessStartInfo.ArgumentList`, which quotes it.
- Relaunch through the host that started the process (`Environment.ProcessPath`): the `ModernUO` apphost runs directly, and `dotnet` gets the assembly path. Before this, a server started from the apphost came back under `dotnet`.
- Use one code path on all platforms. `UseShellExecute = true` on Unix made no difference for a program found on PATH.

This doesn't fix the second half of #2700, where the relaunched server loses the console (and gets killed under systemd or Docker). That comes from the server spawning a copy of itself and exiting, and a follow-up PR will add an opt-in restart exit code for a supervisor to act on.

**Testing:** relaunched from a directory with spaces, started both through `dotnet x.dll` and through the apphost, on Windows. The old code fails there with the error from the issue.
2026-10-13 21:13:34 -07:00
..
Application fix: Bumps dependencies. (#2531) 2026-07-14 15:17:55 -07:00
BuildTool feat: Bumps dependencies. Introduces Serialization Generator v3 (#2584) 2026-08-22 15:48:53 -07:00
Logger fix: Bumps dependencies. (#2531) 2026-07-14 15:17:55 -07:00
Server fix: restart relaunches correctly when the server path contains a space (#2704) 2026-10-13 21:13:34 -07:00
Server.Tests feat: scope container child removal, skip-serialize and linearly delete container children (#2676) 2026-10-09 22:21:50 -07:00
UOContent fix: Fixes spellbook property invalidation when spells change. (#2702) 2026-10-11 14:36:20 -07:00
UOContent.Tests fix: bound and purge NPC vendor buyback stock (#2677) 2026-10-09 22:56:39 -07:00