<?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 Re: fbackup return value in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/fbackup-return-value/m-p/2548846#M875935</link>
    <description>For all RETURNS see the man page of the command.&lt;BR /&gt;&lt;BR /&gt;ie man fbackup and search (/) for RETURNS to get a description of all possible returns and their meaning.&lt;BR /&gt;&lt;BR /&gt;Later,&lt;BR /&gt;Bill</description>
    <pubDate>Thu, 05 Jul 2001 08:13:36 GMT</pubDate>
    <dc:creator>Bill McNAMARA_1</dc:creator>
    <dc:date>2001-07-05T08:13:36Z</dc:date>
    <item>
      <title>fbackup return value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fbackup-return-value/m-p/2548844#M875933</link>
      <description>I am using the system variable ($?) to capture the return value of a fbackup.&lt;BR /&gt;If it returns a 0, then I know that the backup was successful. What if it returns a different value? For example $? = 1024. I would like to know what does it stand for.&lt;BR /&gt;&lt;BR /&gt;Is there a reference table where I can view all the different values to see what does it stands for?</description>
      <pubDate>Thu, 05 Jul 2001 03:07:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fbackup-return-value/m-p/2548844#M875933</guid>
      <dc:creator>Koh Kuan Wong</dc:creator>
      <dc:date>2001-07-05T03:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: fbackup return value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fbackup-return-value/m-p/2548845#M875934</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;fbackup returns 0 upon normal completion, 1 if it is interrupted but allowed to save its state for possible restart, and 2 if any error  conditions prevent the session from completing.&lt;BR /&gt;&lt;BR /&gt;There is no other return value available in fbackup.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Paulson</description>
      <pubDate>Thu, 05 Jul 2001 06:02:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fbackup-return-value/m-p/2548845#M875934</guid>
      <dc:creator>vtpaulson</dc:creator>
      <dc:date>2001-07-05T06:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: fbackup return value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fbackup-return-value/m-p/2548846#M875935</link>
      <description>For all RETURNS see the man page of the command.&lt;BR /&gt;&lt;BR /&gt;ie man fbackup and search (/) for RETURNS to get a description of all possible returns and their meaning.&lt;BR /&gt;&lt;BR /&gt;Later,&lt;BR /&gt;Bill</description>
      <pubDate>Thu, 05 Jul 2001 08:13:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fbackup-return-value/m-p/2548846#M875935</guid>
      <dc:creator>Bill McNAMARA_1</dc:creator>
      <dc:date>2001-07-05T08:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: fbackup return value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fbackup-return-value/m-p/2548847#M875936</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;The fbackup return codes  are :&lt;BR /&gt;&lt;BR /&gt;0 : upon normal completion.&lt;BR /&gt;1 : If it is interrupted but allowed to save its state for possible restart.&lt;BR /&gt;2 : If any error conditions prevent the session from completing.&lt;BR /&gt;4 : If any warning conditions are encountered.&lt;BR /&gt;&lt;BR /&gt;This for error code and for the text explaining what had happend :&lt;BR /&gt;&lt;BR /&gt;IT WILL BE WRITTEN TO THE SERVER'S CONSOLE.&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;BR /&gt;&lt;BR /&gt;Magdi &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Jul 2001 11:10:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fbackup-return-value/m-p/2548847#M875936</guid>
      <dc:creator>Magdi KAMAL</dc:creator>
      <dc:date>2001-07-05T11:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: fbackup return value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fbackup-return-value/m-p/2548848#M875937</link>
      <description>fbackup normally returns 0, 1, 2 or 4 as per the man page.&lt;BR /&gt;Perhaps you're calling fbackup from a C program or&lt;BR /&gt;Perl script via system() or a fork()/exec()/wait().  In this&lt;BR /&gt;case, the return value is encoded per the wait(2) man&lt;BR /&gt;page, so you need use WEXITSTATUS to find out what&lt;BR /&gt;the real exit status is.  A 1024 probably means that&lt;BR /&gt;the return code was actually 4 (1024 &amp;gt;&amp;gt; 8).&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Jul 2001 16:37:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fbackup-return-value/m-p/2548848#M875937</guid>
      <dc:creator>Gregory Fruth</dc:creator>
      <dc:date>2001-07-05T16:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: fbackup return value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fbackup-return-value/m-p/2548849#M875938</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;You can see a list 'fbackup's error codes by number and associated text here: &lt;BR /&gt;&lt;BR /&gt;# strings /usr/lib/nls/C/fbackup.cat &lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 05 Jul 2001 18:36:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fbackup-return-value/m-p/2548849#M875938</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-07-05T18:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: fbackup return value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fbackup-return-value/m-p/2548850#M875939</link>
      <description>thanks for all the feedback so far.&lt;BR /&gt;&lt;BR /&gt;sorry for not explaining in more detail.&lt;BR /&gt;I am calling the fbackup function inside a Perl script using system(). For example:&lt;BR /&gt;system("/usr/sbin/fbackup -v -f /dev/rmt/1m -i /");&lt;BR /&gt;if ($? == 0) {   &lt;BR /&gt;   print "Backup successful!";&lt;BR /&gt;} &lt;BR /&gt;else {&lt;BR /&gt;   print "Error code = $?";&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Gregory, &lt;BR /&gt;Can you please explain a bit more in detail about WEXITSTATUS. How did you derive a 1024 to be a return code of 4?&lt;BR /&gt;&lt;BR /&gt;Thanks again.&lt;BR /&gt;&lt;BR /&gt;Kuan Wong</description>
      <pubDate>Fri, 06 Jul 2001 02:19:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fbackup-return-value/m-p/2548850#M875939</guid>
      <dc:creator>Koh Kuan Wong</dc:creator>
      <dc:date>2001-07-06T02:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: fbackup return value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fbackup-return-value/m-p/2548851#M875940</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You might also want to examine the contents of the perl ERRNO variable $!, which should contain the error returned by the system call. In your case:&lt;BR /&gt;&lt;BR /&gt;system("/usr/sbin/fbackup -v -f /dev/rmt/1m -i /") || die "ERROR: $!\n";&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Vincent&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Jul 2001 09:03:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fbackup-return-value/m-p/2548851#M875940</guid>
      <dc:creator>Vincent Stedema</dc:creator>
      <dc:date>2001-07-06T09:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: fbackup return value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fbackup-return-value/m-p/2548852#M875941</link>
      <description>See the description of Perl's system() call and the&lt;BR /&gt;$? variable for more info.  It'll tell you to divide the&lt;BR /&gt;return value by 256 or right shift it by 8 bits to get&lt;BR /&gt;the actual return value from the called program.&lt;BR /&gt;So (1024 / 256) = (1024 &amp;gt;&amp;gt; 8) = 4.&lt;BR /&gt;&lt;BR /&gt;To be more precise, use Perl's POSIX module&lt;BR /&gt;to get acess to the WEXITSTATUS and associated&lt;BR /&gt;macros, which can be used to decode all parts of&lt;BR /&gt;system()'s return value.  See the docs for Perl's POSIX&lt;BR /&gt;module and the HP-UX man page for wait(2) (i.e.&lt;BR /&gt;"man POSIX" and "man 2 wait").&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;use POSIX;&lt;BR /&gt;$i = system("some program");&lt;BR /&gt;if (WIFEXITED($i)) {&lt;BR /&gt;  printf "exited normally with return code %d\n", WEXITSTATUS($i);&lt;BR /&gt;}&lt;BR /&gt;elsif (WIFSIGNALED($i)) {&lt;BR /&gt;  printf "exited due to signal %d\n", WTERMSIG($i);&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;  print "exited for some other reason\n";&lt;BR /&gt;}</description>
      <pubDate>Fri, 06 Jul 2001 17:49:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fbackup-return-value/m-p/2548852#M875941</guid>
      <dc:creator>Gregory Fruth</dc:creator>
      <dc:date>2001-07-06T17:49:51Z</dc:date>
    </item>
  </channel>
</rss>

