Operating System - HP-UX
1753840 Members
8944 Online
108806 Solutions
New Discussion юеВ

clone equivalent on HP-UX?

 
Srimalik
Valued Contributor

clone equivalent on HP-UX?

Is there is any syscall available on HPUX which can be considered equivalent to clone in linux?
abandon all hope, ye who enter here..
13 REPLIES 13
James R. Ferguson
Acclaimed Contributor

Re: clone equivalent on HP-UX?

Hi:

I suppose that 'vfork' is the closet counterpart to the Linux 'clone()':

http://www.docs.hp.com/en/B2355-60130/vfork.2.html

http://linux.about.com/library/cmd/blcmdl2_clone.htm

Regards!

...JRF...

Srimalik
Valued Contributor

Re: clone equivalent on HP-UX?

vfork(hp) is more similar to vfork in linux.
I want somthing which takes args like CLOME_VM,CLONE_FS.

something which is used by pthread_create?
abandon all hope, ye who enter here..
James R. Ferguson
Acclaimed Contributor

Re: clone equivalent on HP-UX?

Hi (again):

> I want somthing which takes args like CLOME_VM,CLONE_FS

You may be hard-pressed to find 1:1 equivalence since the LINUX kernel differs from the HP-UX (UNIX) one. You might get better answers if you describe exactly what it is you want to achieve. Is this a porting issue of a particular piece of code, for example, or is this a more abstract question?

Regards!

...JRF...
Srimalik
Valued Contributor

Re: clone equivalent on HP-UX?

Hi

> Is this a porting issue of a particular piece of code, for example, or is this a more abstract question?

This is not a porting issue, I was just looking for a function which creates a LWP/thread like entity in HPUX(I don't want to use pthread_create).
abandon all hope, ye who enter here..
Srimalik
Valued Contributor

Re: clone equivalent on HP-UX?

Not sure whether running a process using pthread_create under tusc will show me the call?
abandon all hope, ye who enter here..
Dennis Handly
Acclaimed Contributor

Re: clone equivalent on HP-UX?

>Not sure whether running a process using pthread_create under tusc will show me the call?

By definition tusc must show you the calls. But it is better if you use the pthread functions since libc won't work correctly unless libpthread is present.
Srimalik
Valued Contributor

Re: clone equivalent on HP-UX?

tried tusc and gdb, it seems that _vp_create and _lwp_create are the functions which do that job but these two functions are not available to programers :-(.
abandon all hope, ye who enter here..
Dennis Handly
Acclaimed Contributor

Re: clone equivalent on HP-UX?

>but these two functions are not available to programmers

(system calls) Didn't I say that. :-)
Why do you think you need to use these?
Srimalik
Valued Contributor

Re: clone equivalent on HP-UX?

>Why do you think you need to use these?

was just trying to find out whether we can skip pthread_create. This is just for educational purpose :D
abandon all hope, ye who enter here..