Help for this page

Select Code to Download


  1. or download this
    # If the write handle is a dup give it away entirely, close my copy
    # of it.
    xclose $dad_wtr if $dup_wtr;
    
  2. or download this
    $ perl -MCarp=verbose a.pl
    open3: close(4) failed: Bad file descriptor at /usr/share/perl/5.8/IPC
    +/Open3.pm line 70
            IPC::Open3::xclose(4) called at /usr/share/perl/5.8/IPC/Open3.
    +pm line 218
            IPC::Open3::_open3('open3', 'main', '<&4', '>&STDOUT', '>&STDE
    +RR', '/bin/cat') called at /usr/share/perl/5.8/IPC/Open3.pm line 229
            IPC::Open3::open3('<&4', '>&STDOUT', '>&STDERR', '/bin/cat') c
    +alled at a.pl line 21
    
  3. or download this
    xclose $dad_wtr if $dup_wtr;
    
  4. or download this
    if ($dup_wtr) {
        if (fh_is_fd($dad_wtr)) {
    ...
            xfdclose xfileno($dad_wtr);
        }
    }