#!/usr/bin/env perl # Workaround for the tcsh exec bug. Example: # tcsh> exec shexec zsh use strict; eval { require POSIX; foreach (3..63) { POSIX::close $_ if -t $_ } 1; } or warn <<"EOF"; Perl POSIX module not found! The non-standard file descriptors attached to a tty (as those let open by this buggy tcsh) could not be closed. EOF exec @ARGV; # $Id: shexec 11281 2006-02-27 13:24:27Z lefevre $