The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 04-07-2008
Ametis1970 Ametis1970 is offline
Registered User
 

Join Date: Mar 2008
Posts: 4
Can a child process return a specific value to a parent process ?

Hello everybody !

I have two C source file: child.c and parent.c.

child.c looks like that:
Code:
int main()
{
...
return 15647
}
parent.c calls child using fork()-exec() or posix_spawn().
How can I get in parent the return code from child (here value is 15647) without using interprocess communication (pipe, shared memory, ...) ?
Is there any way to do that without IPC ?

Thank you !
Reply With Quote
Forum Sponsor