tcpdump: Make loop monitor cooperative

This helps a bit if the fgetc() is non-blocking.

Update #4649.
This commit is contained in:
Sebastian Huber 2022-05-11 08:12:21 +02:00
parent 5c88a52bcc
commit a5bdd7ae40

View File

@ -139,6 +139,7 @@ The Regents of the University of California. All rights reserved.\n";
#include <sys/sysctl.h>
#include <machine/rtems-bsd-commands.h>
#include <assert.h>
#include <sched.h>
#include <rtems.h>
#include <rtems/linkersets.h>
#define setpriority(a, b, c)
@ -1224,6 +1225,8 @@ pcap_loop_monitor(rtems_task_argument arg)
pcap_breakloop(pd);
break;
}
sched_yield();
}
rtems_task_delete(RTEMS_SELF);