Skip to content

Commit

Permalink
executor: only report unknown setsid errors
Browse files Browse the repository at this point in the history
Unlike linux the BSDs used to check the result of setsid.

This suddenly became a problem a couple of weeks ago. It's hard
to figure out why because there was a number of problems in the
area preventing the test from working:

gmake executor execprog && \
./bin/openbsd_amd64/syz-execprog -stress -executor ./bin/openbsd_amd64/syz-executor

At least with this change the test above successfully executes some
coverage and exits cleanly.
  • Loading branch information
blackgnezdo authored and a-nogikh committed Jul 9, 2024
1 parent 79d68ad commit bc144f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion executor/common_openbsd.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ static void sandbox_common()
#if SYZ_EXECUTOR
if (!flag_threaded)
#endif
if (setsid() == -1)
if (setsid() == -1 && errno != EPERM)
fail("setsid failed");
#endif

Expand Down

0 comments on commit bc144f9

Please sign in to comment.