| Summary: | [PATCH] init: open /dev/console on FreeBSD | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Jon Boden <jon> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.22.x | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Other | ||
| Host: | Target: | ||
| Build: | |||
| Attachments: | patch for init on FreeBSD | ||
Hi I've been pointed out that Linux doesn't set the CONSOLE variable unless requested in the kernel command-line. Instead, the default is to attach a handle to /dev/console in fds 0, 1 and 2. However patch is still needed on FreeBSD, because the FreeBSD kernel does neither of these things. Fixed in git. |
Created attachment 6496 [details] patch for init on FreeBSD FreeBSD doesn't tell PID 1 the pathname of /dev/console through CONSOLE environment variable like Linux does. Instead it expects PID 1 to always open /dev/console. This patch is tested on ubuntuBSD but I think it should work on FreeBSD too (I haven't tested the whole init yet, just verified that with my patch it can print to stdout).