Operating System - HP-UX
1846556 Members
2689 Online
110256 Solutions
New Discussion

Re: 64 bit process from inetd

 
Andrei Petrov
Advisor

64 bit process from inetd

Hi gurus

I have a 64 bit daemon. It works fine standalone, but for some reason I would like to run it from inetd. It doesnt work. It looks like inetd couldn't load any 64 bit library.
mmap(NULL, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) ........... = 0x9fffffffef7fb000
open("/usr/lib/hpux64/dld.so", O_RDONLY|0x800, 0) ............................................ = 3
read(3, "7fE L F 0202010101\0\0\0\0\0\0\0".., 64) ............................................ = 64
lseek(3, 64, SEEK_SET) ....................................................................... = 64
read(3, "\0\0\006\0\0\004\0\0\0\0\0\0\0@ ".., 504) ........................................... = 504
mmap(NULL, 491664, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_FILE|MAP_SHLIB, 3, 0) ................. = 0xc000000000017000
sysconf(_SC_PAGE_SIZE) ....................................................................... = 4096
mmap(NULL, 4880, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_SHLIB, -1, 0) ........... = 0x9fffffffef7f9000
mmap(0x9fffffffef7f3000, 20984, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_FILE|MAP_SHLIB, 3, 495616) = 0x9ffffff
fef7f3000
close(3) ..................................................................................... = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) ........... = 0x9fffffffef7f1000
audctl(0x9, NULL, NULL, F_OK) ................................................................ = 0
procxsec(4, -1, 0x9ffffffffffffae0, 40) ...................................................... ERR#251 ENOSYS
open("/opt/myproc/bin/myprocd", O_RDONLY|0x800, 0) ............................................... = 3

What did I wrong?
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: 64 bit process from inetd

Shalom Andrei,

May be the only thing you did wrong was run it from inetd.

inetd is designed for a pretty specific purpoase.

If it works find as a stand alone daemon then run it as such and move on.

If you need help making a daemon on hp-ux say that and I or others more awake and perky will tell you how to do it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
A. Clay Stephenson
Acclaimed Contributor

Re: 64 bit process from inetd

None of your mmap()'s return MAP_FAILED so that looks okay. Your procxsec() sets errno = ENOSYS which indicates an unsupported system call. After inetd does a fork(); the exec() should be able to launch a 32-bit or 64-bit executable solely determined by the magic of the executable itself.
If it ain't broke, I can fix that.
Andrei Petrov
Advisor

Re: 64 bit process from inetd

Thanks, guys.

I found that one of loaded libraries was 32-bit one.