<?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: getting the command line argument in HPUX 11.11 in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006088#M98808</link>
    <description>Shalom Raju,&lt;BR /&gt;&lt;BR /&gt;What compiler are we talking about?&lt;BR /&gt;&lt;BR /&gt;Seems that simple code like this should work. Add a printf statement after this:&lt;BR /&gt;pid = atoi(argv[1]);&lt;BR /&gt;&lt;BR /&gt;I'd like to see what we're getting and narrow down the part of the code that is causing the error.&lt;BR /&gt;&lt;BR /&gt;SEP&lt;BR /&gt;</description>
    <pubDate>Fri, 29 Sep 2006 06:54:36 GMT</pubDate>
    <dc:creator>Steven E. Protter</dc:creator>
    <dc:date>2006-09-29T06:54:36Z</dc:date>
    <item>
      <title>getting the command line argument in HPUX 11.11</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006087#M98807</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;I have  HPUX 11.0 box.&lt;BR /&gt;if i compile the snippet on HPUX 11.0  box&lt;BR /&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#define MAX_LENGTH (1024)&lt;BR /&gt;main (argc, argv) int argc; char *argv[]; {&lt;BR /&gt;int pid;&lt;BR /&gt;char long_command [MAX_LENGTH];&lt;BR /&gt;union pstun pu;&lt;BR /&gt;&lt;BR /&gt;pid = atoi(argv[1]);&lt;BR /&gt;pu.pst_command = long_command;&lt;BR /&gt;if (pstat(PSTAT_GETCOMMANDLINE, pu, MAX_LENGTH, 1, pid) == -1) {&lt;BR /&gt;printf("ERROR: pstat() failure using pid(%d)\n", pid);&lt;BR /&gt;exit(-1);&lt;BR /&gt;}&lt;BR /&gt;printf("pid %d = %s\n", pid, pu.pst_command);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I got the error :Undeclared variable 'PSTAT_GETCOMMANDLINE'.&lt;BR /&gt;&lt;BR /&gt;for succesful compilation do i need to compile it on only HPUX11.11 and above..&lt;BR /&gt;&lt;BR /&gt;or am i missing any declaration.. &lt;BR /&gt;&lt;BR /&gt;can someone help me on this...&lt;BR /&gt;&lt;BR /&gt;Thank u all&lt;BR /&gt;raju&lt;/SYS&gt;&lt;/SYS&gt;</description>
      <pubDate>Fri, 29 Sep 2006 03:43:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006087#M98807</guid>
      <dc:creator>S N Raju</dc:creator>
      <dc:date>2006-09-29T03:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: getting the command line argument in HPUX 11.11</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006088#M98808</link>
      <description>Shalom Raju,&lt;BR /&gt;&lt;BR /&gt;What compiler are we talking about?&lt;BR /&gt;&lt;BR /&gt;Seems that simple code like this should work. Add a printf statement after this:&lt;BR /&gt;pid = atoi(argv[1]);&lt;BR /&gt;&lt;BR /&gt;I'd like to see what we're getting and narrow down the part of the code that is causing the error.&lt;BR /&gt;&lt;BR /&gt;SEP&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Sep 2006 06:54:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006088#M98808</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2006-09-29T06:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: getting the command line argument in HPUX 11.11</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006089#M98809</link>
      <description>Hi Raju:&lt;BR /&gt;&lt;BR /&gt;For starters, the header file '/usr/include/sys/pstat/pstat_ops.h' doesn't appear on my 11.0 box.  As I recall, there was extensive work on the 'pstat' interface that occured in 11.11, so I think that you are going to have to redraft your code to compile it on 11.0.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 29 Sep 2006 07:21:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006089#M98809</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-09-29T07:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: getting the command line argument in HPUX 11.11</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006090#M98810</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;If you think issue is resolved, you can assign points and close this thread.&lt;BR /&gt;Your feedback shows 0 out of 14 responses,hope you appreacite that people spend their valuable time helping out and the best way to show gratitude is by assigning points.&lt;BR /&gt;&lt;BR /&gt;Rgds&lt;BR /&gt;&lt;BR /&gt;HGN</description>
      <pubDate>Fri, 29 Sep 2006 08:12:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006090#M98810</guid>
      <dc:creator>HGN</dc:creator>
      <dc:date>2006-09-29T08:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: getting the command line argument in HPUX 11.11</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006091#M98811</link>
      <description>&lt;BR /&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;The error i am facing is compile time error and not runtime error.Is  PSTAT_GETCOMMANDLINE  is a pre-defined variable in HPUX or need to include any header file.I want to know whether PSTAT_GETCOMMANDLINE has been introduced newly in HPUX 11.11..since i am compiling on HPUX 11.0 box. The compiler i am using is C++ compiler and version  is HPUX 11.0..&lt;BR /&gt;&lt;BR /&gt;Thank u all&lt;BR /&gt;Raj</description>
      <pubDate>Mon, 02 Oct 2006 23:35:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006091#M98811</guid>
      <dc:creator>S N Raju</dc:creator>
      <dc:date>2006-10-02T23:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: getting the command line argument in HPUX 11.11</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006092#M98812</link>
      <description>Raju,&lt;BR /&gt;I have compiled your code, as is, on my 11.11 box without problems using gcc.</description>
      <pubDate>Tue, 03 Oct 2006 02:00:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006092#M98812</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-10-03T02:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: getting the command line argument in HPUX 11.11</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006093#M98813</link>
      <description>"man pstat" on 11.0 doesn't list that option</description>
      <pubDate>Tue, 03 Oct 2006 14:41:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006093#M98813</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2006-10-03T14:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: getting the command line argument in HPUX 11.11</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006094#M98814</link>
      <description>you need 11iV1 to get this working</description>
      <pubDate>Tue, 03 Oct 2006 14:53:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006094#M98814</guid>
      <dc:creator>Michal Toth</dc:creator>
      <dc:date>2006-10-03T14:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: getting the command line argument in HPUX 11.11</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006095#M98815</link>
      <description>Hi Raj,&lt;BR /&gt;&lt;BR /&gt;It'll work on 11.0 with some  modifications. The PSTAT_GETCOMMANDLINE variable is undefined since &lt;SYS&gt; file is not present. You have to initialize it to a value that is not used by the kernel or look at its value on an 11i system in the &lt;SYS&gt; file. Here's the version that works on an 11.0 system.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#define MAX_LENGTH (1024)&lt;BR /&gt;&lt;BR /&gt;main (argc, argv) int argc; char *argv[]; {&lt;BR /&gt;int pid, PSTAT_GETCOMMANDLINE = 34;&lt;BR /&gt;char long_command [MAX_LENGTH];&lt;BR /&gt;union pstun pu;&lt;BR /&gt;&lt;BR /&gt;pid = atoi(argv[1]);&lt;BR /&gt;pu.pst_command = long_command;&lt;BR /&gt;if (pstat(PSTAT_GETCOMMANDLINE, pu, MAX_LENGTH, 1, pid) == -1) {&lt;BR /&gt;printf("ERROR: pstat() failure using pid(%d)\n", pid);&lt;BR /&gt;exit(-1);&lt;BR /&gt;}&lt;BR /&gt;printf("pid %d = %s\n", pid, pu.pst_command);&lt;BR /&gt;}&lt;/SYS&gt;&lt;/SYS&gt;&lt;/SYS&gt;</description>
      <pubDate>Wed, 04 Oct 2006 02:57:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006095#M98815</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2006-10-04T02:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: getting the command line argument in HPUX 11.11</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006096#M98816</link>
      <description>&lt;BR /&gt;Hi sandman ,&lt;BR /&gt;&lt;BR /&gt;I was able to compile successfully in HPUX 11.0 &lt;BR /&gt;box.Thank u all for all ur help and support.&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;raju</description>
      <pubDate>Thu, 05 Oct 2006 00:14:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006096#M98816</guid>
      <dc:creator>S N Raju</dc:creator>
      <dc:date>2006-10-05T00:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: getting the command line argument in HPUX 11.11</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006097#M98817</link>
      <description>&lt;BR /&gt;Hi sandman and all,&lt;BR /&gt;&lt;BR /&gt;I was able to compile succesfully by declaring&lt;BR /&gt;"int PSTAT_GETCOMMANDLINE = 34" on HPUX 11.0 box..Thank u all for ur help and support..&lt;BR /&gt;&lt;BR /&gt;raju</description>
      <pubDate>Thu, 05 Oct 2006 00:19:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-the-command-line-argument-in-hpux-11-11/m-p/5006097#M98817</guid>
      <dc:creator>S N Raju</dc:creator>
      <dc:date>2006-10-05T00:19:48Z</dc:date>
    </item>
  </channel>
</rss>

