openbsd: pledge before allowing threads to continue

Avoids a race condition with pcap file directory mode.

Ticket: #8300.
pull/14961/head
Victor Julien 4 weeks ago
parent 1e0f344ab7
commit 56514f3be8

@ -3195,6 +3195,10 @@ void SuricataPostInit(void)
SC_ATOMIC_SET(engine_stage, SURICATA_RUNTIME);
PacketPoolPostRunmodes();
/* pledge before allowing threads to continue to avoid an issue with pcap file directory mode,
* see ticket #8300. */
SCPledge();
/* Un-pause all the paused threads */
TmThreadContinueThreads();
@ -3214,5 +3218,4 @@ void SuricataPostInit(void)
SystemHugepageSnapshotDestroy(prerun_snap);
SystemHugepageSnapshotDestroy(postrun_snap);
}
SCPledge();
}

Loading…
Cancel
Save