Solved

Problem calling exec after program has been started using rexec

Posted on 2004-04-20
1
311 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 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

739 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