summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2005-05-28 04:53:48 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2005-05-28 04:53:48 +0000
commit41cea4848702e95aadcd65a080785233dc8298e0 (patch)
tree117cd61a6fb7a3ea1c2a3626c3e0e7819c36f52b
parent41af71cfceac5f4c7bc5ef53949461073f4833ff (diff)
Use proper modules instead of relying on .ph files.
Use Getopt::Std instead of the perl4 getopts.pl
-rw-r--r--bin/ksh/tests/th19
1 files changed, 12 insertions, 7 deletions
diff --git a/bin/ksh/tests/th b/bin/ksh/tests/th
index d93d8231dfa..2358d29f79c 100644
--- a/bin/ksh/tests/th
+++ b/bin/ksh/tests/th
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-# $OpenBSD: th,v 1.11 2004/11/29 06:20:02 jsg Exp $
+# $OpenBSD: th,v 1.12 2005/05/28 04:53:47 millert Exp $
#
@@ -130,11 +130,10 @@
# s tag can be used several times.
#
-$os = defined $^O ? $^O : 'unknown';
+use POSIX qw(EINTR);
+use Getopt::Std;
-require 'signal.ph' unless $os eq 'os2';
-require 'errno.ph' unless $os eq 'os2';
-require 'getopts.pl';
+$os = defined $^O ? $^O : 'unknown';
($prog = $0) =~ s#.*/##;
@@ -204,7 +203,7 @@ $nxpassed = 0;
%known_tests = ();
-if (!&Getopts('C:p:Ps:t:ve:')) {
+if (!getopts('C:p:Ps:t:ve:')) {
print STDERR $Usage;
exit 1;
}
@@ -516,7 +515,7 @@ run_test
$xpid = waitpid($pid, 0);
$child_kill_ok = 0;
if ($xpid < 0) {
- next if $! == &EINTR;
+ next if $! == EINTR;
print STDERR "$prog: error waiting for child - $!\n";
return undef;
}
@@ -1204,3 +1203,9 @@ check_file_result
return $why;
}
+
+sub HELP_MESSAGE
+{
+ print STDERR $Usage;
+ exit 0;
+}