<?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: ANother script horror in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/another-script-horror/m-p/2971285#M720385</link>
    <description>Hi,&lt;BR /&gt;  Well I want to pick up new skill.That the first/foremost reason why I join this forum.&lt;BR /&gt;Also I did not post the question in the first thread because generating the new thread give me a power to assign a point for those who help.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;your humble servant,&lt;BR /&gt;mB.</description>
    <pubDate>Tue, 13 May 2003 11:42:09 GMT</pubDate>
    <dc:creator>malay boy</dc:creator>
    <dc:date>2003-05-13T11:42:09Z</dc:date>
    <item>
      <title>ANother script horror</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-script-horror/m-p/2971278#M720378</link>
      <description>static jmp_buf jump; &lt;BR /&gt;&lt;BR /&gt;static void alarm_response(int sig) &lt;BR /&gt;{ &lt;BR /&gt;(void) signal(sig,SIG_IGN); &lt;BR /&gt;longjmp(jump,sig); &lt;BR /&gt;return; &lt;BR /&gt;} /* alarm_response */ &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;static void (*oldalrmsig)(int sig) = SIG_DFL; &lt;BR /&gt;&lt;BR /&gt;oldalrmsig = signal(SIGALRM,SIG_IGN); &lt;BR /&gt;&lt;BR /&gt;if (setjmp(mail_jump) == 0) &lt;BR /&gt;{ &lt;BR /&gt;(void) signal(SIGALRM,alarm_response); &lt;BR /&gt;(void) alarm(120); &lt;BR /&gt;popen(...) &lt;BR /&gt;fgets(); &lt;BR /&gt;pclose(); &lt;BR /&gt;(void) alarm(0); &lt;BR /&gt;} &lt;BR /&gt;else &lt;BR /&gt;{ &lt;BR /&gt;(void) fprintf(stderr,"Poopen timed out\n"); &lt;BR /&gt;} &lt;BR /&gt;(void) signal(SIGALRM,oldalrmsig); &lt;BR /&gt;&lt;BR /&gt;Hi Guru's&lt;BR /&gt;   Above I taken out from Mr Clay reply from below :&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x173563f96280d711abdc0090277a778c,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x173563f96280d711abdc0090277a778c,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Could anybody shed some light on all those called function.What is it do ?.&lt;BR /&gt;OR how do I run above.Do I need to comply it or just insert it in the file and just run it.&lt;BR /&gt;&lt;BR /&gt;p/s: Look like C programming.Ooooo!!! Now I know why I not passed my C,C++ exam during school days.&lt;BR /&gt;&lt;BR /&gt;still learning,&lt;BR /&gt;mB&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 13 May 2003 02:50:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-script-horror/m-p/2971278#M720378</guid>
      <dc:creator>malay boy</dc:creator>
      <dc:date>2003-05-13T02:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: ANother script horror</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-script-horror/m-p/2971279#M720379</link>
      <description>Sure this is parts of a C-Program&lt;BR /&gt;using the system calls provided by HP-UX.&lt;BR /&gt;&lt;BR /&gt;The mentioned functions are well defined in the manuals&lt;BR /&gt;&lt;BR /&gt;e.g.  man popen&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Rainer&lt;BR /&gt;</description>
      <pubDate>Tue, 13 May 2003 05:38:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-script-horror/m-p/2971279#M720379</guid>
      <dc:creator>Rainer von Bongartz</dc:creator>
      <dc:date>2003-05-13T05:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: ANother script horror</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-script-horror/m-p/2971280#M720380</link>
      <description>Hi Rainer,&lt;BR /&gt;  I didn't mean to give you 0 point.Miss click.If you reply again then I assign correct points.&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;mB</description>
      <pubDate>Tue, 13 May 2003 05:53:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-script-horror/m-p/2971280#M720380</guid>
      <dc:creator>malay boy</dc:creator>
      <dc:date>2003-05-13T05:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: ANother script horror</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-script-horror/m-p/2971281#M720381</link>
      <description>Sure this is parts of a C-Program&lt;BR /&gt;using the system calls provided by HP-UX.&lt;BR /&gt;&lt;BR /&gt;The mentioned functions are well defined in the manuals&lt;BR /&gt;&lt;BR /&gt;e.g. man popen&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Rainer</description>
      <pubDate>Tue, 13 May 2003 06:13:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-script-horror/m-p/2971281#M720381</guid>
      <dc:creator>Rainer von Bongartz</dc:creator>
      <dc:date>2003-05-13T06:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: ANother script horror</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-script-horror/m-p/2971282#M720382</link>
      <description>anybody ??? some light for the guy in the dark...&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;mB</description>
      <pubDate>Tue, 13 May 2003 10:01:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-script-horror/m-p/2971282#M720382</guid>
      <dc:creator>malay boy</dc:creator>
      <dc:date>2003-05-13T10:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: ANother script horror</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-script-horror/m-p/2971283#M720383</link>
      <description>Well, it's a small example how to implement a watchdog for detecting a hanging popen() call in C language.&lt;BR /&gt;&lt;BR /&gt;The setjump() function saves the current stack environment... then a signal handler (alarm_response) is set and a 120sec alarm is armed, before actually calling the popen().&lt;BR /&gt;&lt;BR /&gt;If the popen times out (takes longer than 120sec) then the alarm pops, the kernel sends SIGALARM, which triggers the signal handler. This handler uses longjmp() to jump to the old stack environment, which is just the else branch of the if statement.&lt;BR /&gt;&lt;BR /&gt;In the original thread a code fragment was posted as question... so Clay assumed that posting another fragment as answer would be OK (it is, IMHO).&lt;BR /&gt;&lt;BR /&gt;See&lt;BR /&gt;man signal(2)&lt;BR /&gt;man alarm(2)&lt;BR /&gt;man popen(3S) pclose(3S)&lt;BR /&gt;man setjmp(3C)&lt;BR /&gt;man longjmp(3C)&lt;BR /&gt;&lt;BR /&gt;Best regard...&lt;BR /&gt; Dietmar.</description>
      <pubDate>Tue, 13 May 2003 11:17:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-script-horror/m-p/2971283#M720383</guid>
      <dc:creator>Dietmar Konermann</dc:creator>
      <dc:date>2003-05-13T11:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: ANother script horror</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-script-horror/m-p/2971284#M720384</link>
      <description>Why do you want to know?&lt;BR /&gt;&lt;BR /&gt;This code comes from another thread and the question in that thread was not yours and was a very specific question.</description>
      <pubDate>Tue, 13 May 2003 11:22:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-script-horror/m-p/2971284#M720384</guid>
      <dc:creator>Frank Slootweg</dc:creator>
      <dc:date>2003-05-13T11:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: ANother script horror</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-script-horror/m-p/2971285#M720385</link>
      <description>Hi,&lt;BR /&gt;  Well I want to pick up new skill.That the first/foremost reason why I join this forum.&lt;BR /&gt;Also I did not post the question in the first thread because generating the new thread give me a power to assign a point for those who help.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;your humble servant,&lt;BR /&gt;mB.</description>
      <pubDate>Tue, 13 May 2003 11:42:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-script-horror/m-p/2971285#M720385</guid>
      <dc:creator>malay boy</dc:creator>
      <dc:date>2003-05-13T11:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: ANother script horror</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-script-horror/m-p/2971286#M720386</link>
      <description>Hi Malay boy,&lt;BR /&gt;&lt;BR /&gt;Just kick some ass :)&lt;BR /&gt;&lt;BR /&gt;You're absolutely right, a forum is to learn things. This is something I always wanted to learn.&lt;BR /&gt;&lt;BR /&gt;I do think, they gave you some good answers already. It's probably some part of C (C++), and "man &lt;FUNCTION&gt;&lt;/FUNCTION&gt;&lt;BR /&gt;But he, I am not easily satisfied as well :&lt;BR /&gt;&lt;A href="http://computer.howstuffworks.com/c.htm" target="_blank"&gt;http://computer.howstuffworks.com/c.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Will tell you more. I think it's quiet a course you're asking for right now. But you awoke me, I am looking into the same course as well right now.&lt;BR /&gt;Never stop learning !!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Best Regs David</description>
      <pubDate>Tue, 13 May 2003 11:53:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-script-horror/m-p/2971286#M720386</guid>
      <dc:creator>David_246</dc:creator>
      <dc:date>2003-05-13T11:53:02Z</dc:date>
    </item>
  </channel>
</rss>

