NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: child process is not created using clone()



In article <BANLkTin=G5QWeWoMZPs==HaaS=unq3cCFQ%mail.gmail.com@localhost>,
Nikunj Badjatya  <nikunjbadjatya%gmail.com@localhost> wrote:
>Hi NetBSD Users,
>
>I also found same issue with NetBSD 5.1 .
>{{{
>Not able to create a child process using clone()  if the executable build by
>linking with pthread library.
>}}}
>
>
>I think this is an issue with 'run time linking' in NetBSD Library.
>Please provide some valuable information on this issue.
>
>

In current:

[4:25pm] 2504>cc sample_clone.c 
[4:25pm] 2505>./a.out 
child stack allocated = 0x7f7ff7701000
child stack = 0x7f7ff7703710

 In child 
[4:25pm] 2506>cc sample_clone.c -lpthread
[4:25pm] 2507>./a.out
child stack allocated = 0x7f7ff7b01000
child stack = 0x7f7ff7b03710

 In child 
[4:26pm] 2509>cc -static sample_clone.c -lpthread
[4:27pm] 2510>./a.out 
child stack allocated = 0x7f7ff7e01000
child stack = 0x7f7ff7e03710

 In child 
[4:27pm] 2511>cc -static sample_clone.c 
[4:27pm] 2512>./a.out 
child stack allocated = 0x7f7ff7e01000
child stack = 0x7f7ff7e03710

 In child 
[4:27pm] 2513>



Home | Main Index | Thread Index | Old Index