By analogy with other test scripts I found that the following patch
fixes the problem for me, but I don't know why (nor do I know why
$ENV{PROG} lines are in some test scripts but not all) so I haven't
installed this.
2006-06-01 Paul Eggert <address@hidden>
* tests/misc/sort: Set $ENV{PROG} to 'sort', to fix a problem
with runaway processes on Solaris 8 reported by Ralf Wildenues in:
http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00178.html
--- tests/misc/sort.~1.3.~ 2005-04-20 00:54:54.000000000 -0700
+++ tests/misc/sort 2006-06-01 18:19:41.000000000 -0700
@@ -15,6 +15,8 @@ use strict;
(my $program_name = $0) =~ s|.*/||;
+$ENV{PROG} = 'sort';
+
# Turn off localisation of executable's ouput.
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;