Enable stdout autoflush in authsock.pl

With enabled buffering the output gets lost when the process
receives a TERM signal. Disable the buffering.

(cherry picked from commit a0311dfb6e2a51f89dfa8b200b96a0f4675fb654)
This commit is contained in:
Aram Sargsyan
2024-05-21 08:45:48 +00:00
committed by Nicki Křížek
parent 9dc5c3709f
commit daa96442c4

View File

@@ -31,6 +31,10 @@ if (!defined($path)) {
exit(1);
}
# Enable output autoflush so that it's not lost when the parent sends TERM.
select STDOUT;
$| = 1;
unlink($path);
my $server = IO::Socket::UNIX->new(Local => $path, Type => SOCK_STREAM, Listen => 8) or
die "unable to create socket $path";