apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damir Dezeljin <program...@mbss.org>
Subject Using parent socket in spawned process???
Date Mon, 21 Mar 2005 14:57:40 GMT
Dear all.

I spent two days trying to use a socket that was opened in the parent from
a spawned process (I'm making a 'demo' on Linux, however my 'final' target
platform is AS400)

Currently my code looks like (parent):
----
apr_socket_create();
apr_sockaddr_create();
...
apr_socket_listen();
apr_socket_accept();
...
apr_procattr_create();
...
apr_os_sock_get();
apr_proc_create();
apr_proc_wait();
----

Child code:
----
...
apr_os_sock_put();
....
----


The child is spawned, however nothing that is written to the socket is
ever received by the client side. What am I doing wrong?

BTW: I don't want to use pipes between child and the parent as this would
mean an additional memcpy (waste of resorses).


Thanks and regards,
Dezo


Mime
View raw message