The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 01-03-2009
tkang007 tkang007 is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 3
At ksh, I can only close fd to 9 as your case.
But, I can do it by using Perl as the following test case.
t1.c : open 10 files
t2.pl : close fd from 3
t3.c : only wait a key to verify fds by using AIX 5.3 dbx's fd subcomamnd.

At p2.pl
use POSIX::close

for ($fd=100; $fd > 2; $fd--) { # 100 is ok on my case.
POSIX::close($fd) # execution error, but has effect.
}

exec "./t3"