<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Help me debugging this ..... in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/help-me-debugging-this/m-p/3268084#M715064</link>
    <description>Hello colleagues.&lt;BR /&gt;I've found a problem running this PERL script but I cannot still understand what kind of problem exactly.&lt;BR /&gt;The script should copy a file in a gzipped format; to do this the script gzip the file, then write it to a remote socket.&lt;BR /&gt;The problem is either inside the gzipping or inside the remote transfer ...&lt;BR /&gt;Sometimes the file isn't fully copied in the remote host; it seems that the gzip is interrupted or the remote transfer is interrupted.&lt;BR /&gt;The right remote file size is 65536; sometimes only 44361 are copied.&lt;BR /&gt;Please see the branch of the PERL program; we are in the "compress" case.... maybe some environmental variable is exhausted??&lt;BR /&gt;&lt;BR /&gt;my($in) = gensym();&lt;BR /&gt;my($out) = gensym();&lt;BR /&gt;my($err) = gensym();&lt;BR /&gt;&lt;BR /&gt;my $currFile;&lt;BR /&gt;foreach $currFile (@files) {&lt;BR /&gt;   if ($compress eq "compress") {&lt;BR /&gt;     my($pid) = open3($in, $out, "", "/usr/contrib/bin/gzip -c $currFile");&lt;BR /&gt;      } else {&lt;BR /&gt;          open($out, "&amp;lt;$currFile");&lt;BR /&gt;      }&lt;BR /&gt;&lt;BR /&gt;      # Write the content to the local file.&lt;BR /&gt;      my $currRemoteFile;&lt;BR /&gt;      my $isdir = RemoteExec($host, "\[ -d $remoteFile ]\ \&amp;amp;\&amp;amp; echo 0 \|\| echo 1", $user, $system, $instance);&lt;BR /&gt;      chomp $$isdir[0];&lt;BR /&gt;      if ($$isdir[0] eq "0") {&lt;BR /&gt;        $currRemoteFile = $remoteFile . "/" . basename($currFile);&lt;BR /&gt;      } else {&lt;BR /&gt;          $currRemoteFile = $remoteFile;&lt;BR /&gt;      }&lt;BR /&gt;&lt;BR /&gt;      if ($compress eq "compress") {&lt;BR /&gt;        my $hnd = RemoteWriteFromArray($host, "${currRemoteFile}.gz", $user, $group, $mode, undef, $system, $in&lt;BR /&gt;stance, "NOBUFFER");&lt;BR /&gt;        while (&amp;lt;$out&amp;gt;) {&lt;BR /&gt;          print $hnd $_;&lt;BR /&gt;        }&lt;BR /&gt;</description>
    <pubDate>Wed, 05 May 2004 08:24:31 GMT</pubDate>
    <dc:creator>Enrico Venturi</dc:creator>
    <dc:date>2004-05-05T08:24:31Z</dc:date>
    <item>
      <title>Help me debugging this .....</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-me-debugging-this/m-p/3268084#M715064</link>
      <description>Hello colleagues.&lt;BR /&gt;I've found a problem running this PERL script but I cannot still understand what kind of problem exactly.&lt;BR /&gt;The script should copy a file in a gzipped format; to do this the script gzip the file, then write it to a remote socket.&lt;BR /&gt;The problem is either inside the gzipping or inside the remote transfer ...&lt;BR /&gt;Sometimes the file isn't fully copied in the remote host; it seems that the gzip is interrupted or the remote transfer is interrupted.&lt;BR /&gt;The right remote file size is 65536; sometimes only 44361 are copied.&lt;BR /&gt;Please see the branch of the PERL program; we are in the "compress" case.... maybe some environmental variable is exhausted??&lt;BR /&gt;&lt;BR /&gt;my($in) = gensym();&lt;BR /&gt;my($out) = gensym();&lt;BR /&gt;my($err) = gensym();&lt;BR /&gt;&lt;BR /&gt;my $currFile;&lt;BR /&gt;foreach $currFile (@files) {&lt;BR /&gt;   if ($compress eq "compress") {&lt;BR /&gt;     my($pid) = open3($in, $out, "", "/usr/contrib/bin/gzip -c $currFile");&lt;BR /&gt;      } else {&lt;BR /&gt;          open($out, "&amp;lt;$currFile");&lt;BR /&gt;      }&lt;BR /&gt;&lt;BR /&gt;      # Write the content to the local file.&lt;BR /&gt;      my $currRemoteFile;&lt;BR /&gt;      my $isdir = RemoteExec($host, "\[ -d $remoteFile ]\ \&amp;amp;\&amp;amp; echo 0 \|\| echo 1", $user, $system, $instance);&lt;BR /&gt;      chomp $$isdir[0];&lt;BR /&gt;      if ($$isdir[0] eq "0") {&lt;BR /&gt;        $currRemoteFile = $remoteFile . "/" . basename($currFile);&lt;BR /&gt;      } else {&lt;BR /&gt;          $currRemoteFile = $remoteFile;&lt;BR /&gt;      }&lt;BR /&gt;&lt;BR /&gt;      if ($compress eq "compress") {&lt;BR /&gt;        my $hnd = RemoteWriteFromArray($host, "${currRemoteFile}.gz", $user, $group, $mode, undef, $system, $in&lt;BR /&gt;stance, "NOBUFFER");&lt;BR /&gt;        while (&amp;lt;$out&amp;gt;) {&lt;BR /&gt;          print $hnd $_;&lt;BR /&gt;        }&lt;BR /&gt;</description>
      <pubDate>Wed, 05 May 2004 08:24:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-me-debugging-this/m-p/3268084#M715064</guid>
      <dc:creator>Enrico Venturi</dc:creator>
      <dc:date>2004-05-05T08:24:31Z</dc:date>
    </item>
  </channel>
</rss>

