<?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 Problem in EXEC system call in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-exec-system-call/m-p/2524781#M878657</link>
    <description>Hi ,&lt;BR /&gt;&lt;BR /&gt;I' ve encountered a strange problem while using the exec() system call.&lt;BR /&gt;The description of the problem is as follows:&lt;BR /&gt;&lt;BR /&gt;We are using "execl()' system call to load program B in the process space to replace the current program A.&lt;BR /&gt;This call is executed successfully and the program B starts executing in the place of the program A.&lt;BR /&gt;Now at the end of the program B we again want to return back to program A and hence we again use execl() to load program A.&lt;BR /&gt;At this point of time "execl" system call fails and errno is set to "ENOMEM" i.e. Not Enough Memory.&lt;BR /&gt;The size of the program A is 425 KB and that of program B is 45 KB. &lt;BR /&gt;Is there any way to retain the process space even if the new program is less than size of the previous program ???&lt;BR /&gt;&lt;BR /&gt;Another imp observation is that the same process of using execl goes successfully when we do execl between program A and program C.&lt;BR /&gt;The size of the program C is 216 KB.&lt;BR /&gt;&lt;BR /&gt;Can you give me some pointers in this problem ???&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
    <pubDate>Fri, 04 May 2001 03:23:03 GMT</pubDate>
    <dc:creator>Srinivas Sreekumar</dc:creator>
    <dc:date>2001-05-04T03:23:03Z</dc:date>
    <item>
      <title>Problem in EXEC system call</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-exec-system-call/m-p/2524781#M878657</link>
      <description>Hi ,&lt;BR /&gt;&lt;BR /&gt;I' ve encountered a strange problem while using the exec() system call.&lt;BR /&gt;The description of the problem is as follows:&lt;BR /&gt;&lt;BR /&gt;We are using "execl()' system call to load program B in the process space to replace the current program A.&lt;BR /&gt;This call is executed successfully and the program B starts executing in the place of the program A.&lt;BR /&gt;Now at the end of the program B we again want to return back to program A and hence we again use execl() to load program A.&lt;BR /&gt;At this point of time "execl" system call fails and errno is set to "ENOMEM" i.e. Not Enough Memory.&lt;BR /&gt;The size of the program A is 425 KB and that of program B is 45 KB. &lt;BR /&gt;Is there any way to retain the process space even if the new program is less than size of the previous program ???&lt;BR /&gt;&lt;BR /&gt;Another imp observation is that the same process of using execl goes successfully when we do execl between program A and program C.&lt;BR /&gt;The size of the program C is 216 KB.&lt;BR /&gt;&lt;BR /&gt;Can you give me some pointers in this problem ???&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Fri, 04 May 2001 03:23:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-exec-system-call/m-p/2524781#M878657</guid>
      <dc:creator>Srinivas Sreekumar</dc:creator>
      <dc:date>2001-05-04T03:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in EXEC system call</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-exec-system-call/m-p/2524782#M878658</link>
      <description>have u used free() at the end of program B</description>
      <pubDate>Fri, 04 May 2001 09:03:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-exec-system-call/m-p/2524782#M878658</guid>
      <dc:creator>Ravi_8</dc:creator>
      <dc:date>2001-05-04T09:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in EXEC system call</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-exec-system-call/m-p/2524783#M878659</link>
      <description>Never seen this one before and it's very strange. What OS and compiler are you using?&lt;BR /&gt;&lt;BR /&gt;I think I would try the other variants of exec&lt;BR /&gt;(execle,execlp,etc.).&lt;BR /&gt;Another workaround might be to&lt;BR /&gt;Use system in Program A to call program B and then when you exit B; A is where you left it.&lt;BR /&gt;&lt;BR /&gt;These sizes you are giving us - what are they?&lt;BR /&gt;If they are the size of the executable that means almost nothing other than a hint at the size of the text section. Use glance, top, or a ps -l to get a better idea of the total program size.&lt;BR /&gt;&lt;BR /&gt;I think with a little more data we can pin this one down. After all, the shell and processes spawned under it has to do exactly what you are doing.&lt;BR /&gt;&lt;BR /&gt;Just some food for thought, Clay&lt;BR /&gt;</description>
      <pubDate>Fri, 04 May 2001 16:59:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-exec-system-call/m-p/2524783#M878659</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-05-04T16:59:36Z</dc:date>
    </item>
  </channel>
</rss>

