diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-B58D282E-E6EC-4AE1-96DB-30A5FB850563.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-B58D282E-E6EC-4AE1-96DB-30A5FB850563.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,29 @@ + + + + + +<codeph>exec()</codeph> without +forking using <apiname>posix_spawn()</apiname> +

A UNIX® program may exec without forking. The result is that the calling +process executes another binary, but inherits certain properties, for example, +file descriptors.

+

The P.I.P.S. equivalent would be to call posix_spawn() and +pass any inherited data via argv parameters.

+

Note that if a parent process is waiting for the child to terminate then +the termination of the newly created task must be synchronised. Therefore +a waitpid() call should follow the posix_spawn() call +so that it does not exit prematurely. Otherwise exit() can +be called after the posix_spawn().

+

Also, note that if the process which formerly executed and +which now uses posix_spawn() stores its PID (for example, +in the file system) to allow other processes to target it, then care must +be taken to store the relevant PID (Process ID). This is because the PID for +the newly spawned process may need to be stored instead.

+
\ No newline at end of file