* Instead of fork()ing, which leaks memory (and runs a second
BApplication inside the Run() of the original one, which was
the source of a TODO), use posix_spawn to start a second process
altogether.
* Move session initialization code to the new user_main(), invoked
from main() if we are starting a user session.
* Send event registration messages to the new session daemon
in _HandleRegisterSessionDaemon, as the child no longer has access
to the old events list from before fork()ing and must receive it.
The last of these fixes a race: previously, if an event was registered
or triggered between when the child (user) launch_daemon was fork()ed off
the parent and when it registered with the root launch_daemon, those
events were "lost" and would never be forwarded to the child.
That happened not altogether infrequently for some people (myself
included) especially in virtual machines for the "initial_volumes_mounted"
event, which was the most common remaining cause of "boot hangs on rocket"
or "boots to blue screen with only mouse cursor" problems.
So, in addition to being cleaner overall and resolving a number of TODOs,
this also fixes#17365.
Change-Id: I1ea28cba8938a38b3c27685d7f3943f596cfe7ec
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4968
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
* I have to figure out how to do this every major
release, put here to document somewhat.
* The os images are empty files for obvious reasons
* This vagrant box is used by qemu for their automated
testing under Haiku
https://github.com/qemu/qemu/blob/master/tests/vm/haiku.x86_64
Change-Id: I8e02104063284a96e1672051e3d504a78a64cfe3
This reverts commit d493aae3c4.
The default shine and shadow color are pure black and white. They are
not meant to be used directly, but mixed with the background color for
more subtle results.
The previous code using tint_color was also just fine.
Fixes#17577.
Noticed because Pootle showed "Video data between line lu and lu".
Change-Id: I55eeba9d3df88debbf2121a653b8220e643d07bb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4959
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This way, the first unlucky application to request the font list
after paths change (or on first app_server startup) will not stall out
while the font list is rebuilt, at least most of the time.
Should fix#17574.
As far as I can tell, this TODO has been resolved since 3 hours after
it was added in 2005, when the second case of B_ENTRY_REMOVED (i.e.
single-file removal instead of whole-directory removal) was implemented.
_RemoveDirectory does not appear to be fully implemented, though;
but it has its own TODO and does not need this one.
Now that we are merely doing basic comparison tests and do not invoke
get_thread_info or the like, this is cheap enough that we can enable it
even when DEBUG is not enabled, and get assertions in more cases.
"delete object;" is logically the same as "object->ReleaseReference();"
when there is a reference count of 1, and we need to permit that instead
of asserting on it, so the case where a referenceable object is a member
variable of a class works without asserting.
This manifested in packagefs: the Resolvable class has a linked-list with
Dependency objects (which are referenceable) in it. (Further, the stack
checks do not work quite right for kernel stacks.)
Fixes#17575.
* Put all fields in the same order they are in the header.
* Add missing initializers for various fields to NULL or -1;
while these should be initialized by later routines,
for consistency's sake we should also clear them here.
Instead of the malloc_referenced system. Makes for some cleaner code,
and the malloc_referenced system was only used here, so it can now be
dropped altogether.
This code has been broken like this since 2012, so I am skeptical
that it is the cause of the more recently observed #17463.
It is however possible that more recent changes caused things
to get noticeably worse for some reason.
This may, however, resolve some of the other KDLs, e.g. #12847.
The function is largely useless if we cannot lock kernel space,
and the consumers may not expect it to silently "fail." Hence,
we now put the invocation of deferred_free in free_etc directly.
Save ShortcutName() (i.e. filename) instead of the potentially
translated decorator Name(). If the decorator has no ref but
fInitStatus is B_OK and fPath == "Default" return Default
decorator in ShortcutName(). The Default decorator unlike other
decorators has no file on disk associated with it.
We don't need to look for ShortcutName() when iterating through
decorators anymore because we look for "Default" then file names
before we try to find by name.
Fixes#16412
Change-Id: I3109681d11931e7f55b7afaf3a65af2fb9ed5e10
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4320
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
STOPPED errors are generated by StopEndpoint commands, which we issue,
so presumably we expect that we will get some STOPPED errors when doing
so, thus printing these is not really necessary.
This checks the reference counts are actually 0 (or 1 and allocated
on the stack). As PARANOID_KERNEL_FREE is enabled at KDEBUG_LEVEL 2,
this will thus be enabled on nightly builds.
* Adjust a comment that now goes with 3 functions and not just 1.
* Remove spinlock switch function, this is useless as it cannot
change interrupt states here, but we require interrupts to
be enabled to wait on a ConditionVariable.
* Remove WaitStatus function from ConditionVariableEntry; unused
and would require locks anyway.
* Implement Publish using Init.
In the case where a weakly declared symbol has no definition,
it should just resolved to be NULL instead of failing to load at all.
GCC 11 builds of libroot.so wind up having one weak symbol
declaration that is unresolved at runtime, to __cxa_pure_virtual,
which seems to be provided by some object in libsupc++.a that ld
does not pull in automatically (and has to be forced at present.)
This change also amends symbol patcher behavior: it is now possible
for the symbol patcher to indicate symbols should be hidden by
changing the passed-in type to 0, instead. (Otherwise, weak symbols
would always get a value of NULL instead of being able to be hidden.)
Fixes#8288.
Previously-reviewed-on: https://review.haiku-os.org/c/haiku/+/4768
Change-Id: I6485c4e515cb53c6b81db971efbc10008fa6bd9d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4932
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This file is used only by the u-boot raw bootloader and
it has identical content to platform/u-boot/mmu.h.
Therefore we can use mmu.h in the u-boot loader and remove
this header.
EFI platform has its own arch_mmu.h in
headers/private/kernel/boot/platform/efi
Change-Id: Ie77774fbcf4855f9bc643176c179670f6169b3b6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4929
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Now that the interlocking issues are resolved with the previous commit,
using the main TQ_SLEEP mechanism no longer causes deadlocks and
network I/O freezes, so we can drop the custom code and use FreeBSD's
code instead.