Alternative for API system() in multi-threaded app

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

 



I was trying to replace system() API in my multi-threaded app as it is suggested not to any calls in multi-threaded app which uses fork().....
When I was going through the man pages of fork()..in the Notes section I found 
       "Since version 2.3.3, rather than invoking the kernel's fork() system call, the glibc fork() wrapper that is provided as part of the NPTL threading implemenâ
       tation invokes clone(2) with flags that provide the same effect as the traditional system call.  The glibc wrapper invokes any fork handlers that have  been
       established using pthread_atfork(3)."

Is this mean, I still can use fork() or any other API which uses fork() for its implementation and make sure my app is thread safe or free from dead locks????

Thanks,
Praveen R
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux