Solved

Problem calling exec after program has been started using rexec

Posted on 2004-04-20
1
310 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
1 Comment
 
LVL 4

Accepted Solution

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

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
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.:

820 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