fix(libc): export daemon #2842

Merged
Get-fix merged 1 commit from upstream-pr/2842 into main 2026-10-11 07:49:05 +00:00
Get-fix commented 2026-10-10 16:27:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Get-fix on 2026-10-10T16:27:12Z.


What

VLC (PPSA85300) imports daemon (Wn6I3wVATUE) and fails to load because no library exports it. It reaches this stop after execvp (#2827) and dup2 (#2478). Forking into the background is not supported, so daemon throws daemon: forking into the background not implemented. VLC 3.0 calls it only when its daemon option is set (libvlc.c), and the title starts libVLC with --ignore-config and without --daemon (player.cc). The new guest_daemon test checks the throw.

Tested

Windows 11 (WinLibs GCC 15.2.0 r7), Release, full build with BUILD_TESTING=ON on main 57f96fd2:

  • guest_daemon passes 5/5. With a silent return -1 or a different message planted, it fails.
  • All 44 libc tests that build on Windows pass.
  • tools/check_conventions.py and tools/check_test_registration.py pass.
  • VLC v0.3 (catalog sha256), with the same converted executable and two fully rebuilt library sets whose sources differ only by this change, two runs each: with main + the execvp branch + #2478 it stops at FAIL: unresolved ELF import Wn6I3wVATUE from libSceLibcInternal.prx (daemon); with this change as well it stops at FAIL: unresolved ELF import 5G2ONUzRgjY from libSceLibcInternal.prx (memrchr, #1592, #1906 and #2277 closed).

Not tested on Linux. The same branch and results are posted in #1578.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4812718621 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2842). Originally posted by [Get-fix](https://github.com/Get-fix) on 2026-10-10T16:27:12Z. --- ### What VLC (PPSA85300) imports `daemon` (`Wn6I3wVATUE`) and fails to load because no library exports it. It reaches this stop after `execvp` ([#2827](https://github.com/boykopovar/AnyPS5/pull/2827)) and `dup2` (#2478). Forking into the background is not supported, so `daemon` throws `daemon: forking into the background not implemented`. VLC 3.0 calls it only when its `daemon` option is set ([`libvlc.c`](https://github.com/videolan/vlc/blob/6de05adcbaf2e8b85fe86aad4169393098628119/src/libvlc.c#L190-L197)), and the title starts libVLC with `--ignore-config` and without `--daemon` ([`player.cc`](https://github.com/ZiZc3/VLC/blob/f3253020a64368153233ede29183014c0b6c8979/src/player.cc#L960-L981)). The new `guest_daemon` test checks the throw. ### Tested Windows 11 (WinLibs GCC 15.2.0 r7), Release, full build with `BUILD_TESTING=ON` on `main` 57f96fd2: - `guest_daemon` passes 5/5. With a silent `return -1` or a different message planted, it fails. - All 44 libc tests that build on Windows pass. - `tools/check_conventions.py` and `tools/check_test_registration.py` pass. - VLC v0.3 (catalog sha256), with the same converted executable and two fully rebuilt library sets whose sources differ only by this change, two runs each: with `main` + the `execvp` branch + #2478 it stops at `FAIL: unresolved ELF import Wn6I3wVATUE from libSceLibcInternal.prx` (`daemon`); with this change as well it stops at `FAIL: unresolved ELF import 5G2ONUzRgjY from libSceLibcInternal.prx` (`memrchr`, #1592, #1906 and #2277 closed). Not tested on Linux. The same branch and results are posted in [#1578](https://github.com/boykopovar/AnyPS5/issues/1578#issuecomment-6099678125). ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-10 16:27:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T16:27:23Z.


Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6099680915 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2842#issuecomment-6099680915). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-10T16:27:23Z. --- Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
github-actions[bot] commented 2026-10-10 16:27:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T16:27:32Z.


Progress report (2a4e03c → 520b9fa)

📉 System libraries: 85.8% (-0.03%, +1 declared functions)

🆕 1 declared as stubs
Library Name
libc daemon_nid_postfix
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6099682372 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2842#issuecomment-6099682372). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-10T16:27:32Z. --- <!-- progress-report --> ### Progress report (2a4e03c → 520b9fa) 📉 **System libraries**: 85.8% (-0.03%, +1 declared functions) <details> <summary>🆕 1 declared as stubs</summary> | Library | Name | | - | - | | libc | `daemon_nid_postfix` | </details>
oneandonlydean commented 2026-10-11 05:08:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T05:08:45Z.


Reopened. Conflict in core/libs/prx/libc/CMakeLists.txt. Can you rebase?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6105703282 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2842#issuecomment-6105703282). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-11T05:08:45Z. --- Reopened. Conflict in `core/libs/prx/libc/CMakeLists.txt`. Can you rebase?
adriadam10 commented 2026-10-11 07:23:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T07:23:55Z.


Rebased onto main (conflict with the neighbouring test block in core/libs/prx/libc/CMakeLists.txt, kept both).

Checked on Linux: guest_daemon passes; without the change it does not link (daemon_nid_postfix missing). The thrown message matches NotImplemented_nid_no_patch, and the TechnicalDebt line sits under "Functional". Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106644858 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2842#issuecomment-6106644858). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T07:23:55Z. --- Rebased onto main (conflict with the neighbouring test block in `core/libs/prx/libc/CMakeLists.txt`, kept both). Checked on Linux: `guest_daemon` passes; without the change it does not link (`daemon_nid_postfix` missing). The thrown message matches `NotImplemented_nid_no_patch`, and the TechnicalDebt line sits under "Functional". Merging once CI is green.
adriadam10 commented 2026-10-11 07:44:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T07:44:25Z.


Rebased onto main again (conflict with the neighbouring guest_memrchr test block in core/libs/prx/libc/CMakeLists.txt, kept both).

Re-checked on Linux: guest_daemon passes, as do guest_memrchr and the rest of the libc/libs scope. Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106799851 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2842#issuecomment-6106799851). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T07:44:25Z. --- Rebased onto main again (conflict with the neighbouring `guest_memrchr` test block in `core/libs/prx/libc/CMakeLists.txt`, kept both). Re-checked on Linux: `guest_daemon` passes, as do `guest_memrchr` and the rest of the libc/libs scope. Merging once CI is green.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!2842
No description provided.