Operating System - HP-UX
1753797 Members
7224 Online
108799 Solutions
New Discussion юеВ

Problems with execl system call

 
Srikanth_14
Occasional Advisor

Problems with execl system call

Hi,

I am using execl() system call to launch another binary executable on a HP-UX OS platform. But the execl returns a error code -1 and the description of the error is "Bad Address"
The program was compiled using the aCC compiler version 03.10. Any idea what could be the problem. Should any patch be applied to the aCC inorder to get this working.

Thanks,
Srikanth

 

 

Moved from HP-UX Technical Documentation to HP-UX > languages

5 REPLIES 5
steven Burgess_2
Honored Contributor

Re: Problems with execl system call

Hello

Stab in the dark....

error code 1 is EPERM - Not super user. The programme you are calling isn't owned by root is it ? you not trying to do something you don't have permission to ?

HTH

Steve
take your time and think things through
Muthukumar_5
Honored Contributor

Re: Problems with execl system call

Steven,

he got the error code -1 not the error 1.

Bad Address is notified as "EFAULT"

execl man page for EFAULT says as,

[EFAULT] path, argv, or envp point to an illegal address. The reliable detection of this error is implementation dependent.

Easy to suggest when don't know about the problem!
Srikanth_14
Occasional Advisor

Re: Problems with execl system call

The same code compiled on a different HP-UX machine works just fine. So was wondering if any aCC compiler or HP-UX related patches needs to be applied. Any ideas would be grealtly appreciated.

Thanks
V. Nyga
Honored Contributor

Re: Problems with execl system call

Hi,

you can check differences in the patch versions of the different workstations with 'swlist -l product|grep aCC'

HTH
Volkmar
*** Say 'Thanks' with Kudos ***
Muthukumar_5
Honored Contributor

Re: Problems with execl system call

Get the aCC version on different platforms as
what `which aCC`

May be aCC problem / architecture change cause

Easy to suggest when don't know about the problem!