mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
Kernel/Tasks: Allow Kernel processes to be shut down
Since we never check a kernel process's state like a userland process, it's possible for a kernel process to ignore the fact that someone is trying to kill it, and continue running. This is not desireable if we want to properly shutdown all processes, including Kernel ones.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
8940552d1d
commit
021fb3ea05
@@ -96,7 +96,7 @@ void NetworkTask_main(void*)
|
||||
auto buffer = (u8*)buffer_region->vaddr().get();
|
||||
UnixDateTime packet_timestamp;
|
||||
|
||||
for (;;) {
|
||||
while (!Process::current().is_dying()) {
|
||||
flush_delayed_tcp_acks();
|
||||
retransmit_tcp_packets();
|
||||
size_t packet_size = dequeue_packet(buffer, buffer_size, packet_timestamp);
|
||||
@@ -127,6 +127,8 @@ void NetworkTask_main(void*)
|
||||
dbgln_if(ETHERNET_DEBUG, "NetworkTask: Unknown ethernet type {:#04x}", eth.ether_type());
|
||||
}
|
||||
}
|
||||
Process::current().sys$exit(0);
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
void handle_arp(EthernetFrameHeader const& eth, size_t frame_size)
|
||||
|
||||
Reference in New Issue
Block a user