Skip to content

Commit a76e2a3

Browse files
eugeneugen
authored andcommitted
MFC r368148: fix hastd(8)
hastd(8) assumes it has no extra file descriptors opened and aborts otherwise, so call closefrom() early. PR: 227461
1 parent c59555f commit a76e2a3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sbin/hastd/hastd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,6 +1222,7 @@ main(int argc, char *argv[])
12221222
pjdlog_init(PJDLOG_MODE_STD);
12231223
pjdlog_debug_set(debuglevel);
12241224

1225+
closefrom(MAX(MAX(STDIN_FILENO, STDOUT_FILENO), STDERR_FILENO) + 1);
12251226
g_gate_load();
12261227

12271228
/*

0 commit comments

Comments
 (0)