Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Problem calling exec after program has been started using rexec

Posted on 2004-04-20
1
Medium Priority
?
316 Views
Last Modified: 2013-12-27
OS Solaris 2.8.
Language C/C++
Lets say I have an executable xxx which perfoms certain things like forking a child, which becomes a demon. After that, demon forks another child, which becomes group leader( of new group ) and after that it tries to call 'execvp' to start another executable( aaa ).
Everything works perfectly.

Problem arises when I start xxx from another program using 'rexec'.
While debugging xxx, it behaves correctly till the call execvp happens.
Here is what I see in workshop:
dbx: process 6733 about to exec("/export/home/izh1/its/bin/aaa")
dbx: warning: LO "/export/home/izh1/its/src/-" destroyed while there are references to it
Reading aaa

>>loading
>>reading additional symbolic information

execution completed, exit code is 795441768
(dbx)

Now I will show you successfull case.
In case I am starting xxx from command line than in the same place (in workshop) I would get:
dbx: process 6733 about to exec("/export/home/izh1/its/bin/aaa")
dbx: warning: LO "/export/home/izh1/its/src/-" destroyed while there are references to it
Reading aaa
Reading libbla1.so
Reading libbla2.so
Reading libbla3.so
(dbx)
And worshop ends up in the aaa process.

Can anyone help me out to understand what is the problem?  Why program which works perfectly stops working properly after it has been started using rexec?
Any inputs are appreciated.

0
Comment
Question by:igor1026
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
Otetelisanu earned 2000 total points
ID: 10876950
If you start with rexec must
the environemet variable in the
script same as to the rserver.

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question