summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2013-01-08 21:20:01 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2013-01-08 21:20:01 +0000
commit56934581f39e4c51f80fd6e93e0405533764a85e (patch)
tree6f4b20b10aea31321405c6f637ecd98d24341e13
parent286fe82858eb94371c80661b3dc14e8e5cdf05b1 (diff)
Autoflush the log file of the child process.
-rw-r--r--regress/sys/kern/sosplice/Proc.pm5
-rw-r--r--regress/usr.sbin/relayd/Proc.pm6
2 files changed, 7 insertions, 4 deletions
diff --git a/regress/sys/kern/sosplice/Proc.pm b/regress/sys/kern/sosplice/Proc.pm
index f65fa7c592c..12b95daf477 100644
--- a/regress/sys/kern/sosplice/Proc.pm
+++ b/regress/sys/kern/sosplice/Proc.pm
@@ -1,6 +1,6 @@
-# $OpenBSD: Proc.pm,v 1.1 2013/01/03 17:36:37 bluhm Exp $
+# $OpenBSD: Proc.pm,v 1.2 2013/01/08 21:20:00 bluhm Exp $
-# Copyright (c) 2010-2012 Alexander Bluhm <bluhm@openbsd.org>
+# Copyright (c) 2010-2013 Alexander Bluhm <bluhm@openbsd.org>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -19,6 +19,7 @@ use warnings;
package Proc;
use Carp;
+use IO::File;
use List::Util qw(first);
use POSIX;
use Time::HiRes qw(time alarm sleep);
diff --git a/regress/usr.sbin/relayd/Proc.pm b/regress/usr.sbin/relayd/Proc.pm
index c9b2a1eae42..ea1ea6fab08 100644
--- a/regress/usr.sbin/relayd/Proc.pm
+++ b/regress/usr.sbin/relayd/Proc.pm
@@ -1,6 +1,6 @@
-# $OpenBSD: Proc.pm,v 1.4 2013/01/04 14:01:49 bluhm Exp $
+# $OpenBSD: Proc.pm,v 1.5 2013/01/08 21:20:00 bluhm Exp $
-# Copyright (c) 2010-2012 Alexander Bluhm <bluhm@openbsd.org>
+# Copyright (c) 2010-2013 Alexander Bluhm <bluhm@openbsd.org>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -20,6 +20,7 @@ use warnings;
package Proc;
use Carp;
use Errno;
+use IO::File;
use POSIX;
use Time::HiRes qw(time alarm sleep);
@@ -66,6 +67,7 @@ sub new {
or croak "$class log file not given";
open(my $fh, '>', $self->{logfile})
or die "$class log file $self->{logfile} create failed: $!";
+ $fh->autoflush;
$self->{log} = $fh;
return bless $self, $class;
}