mi_process_exec and shared memory
Posted in 2010
Topics: Triggers, Constraints & Referential Integrity
Tried this in the datablade forum, but no answer. Thought I would try here also. I would like to start an external process from a trigger. So, I am looking at the example on mi_process_exec() which is supposed to do a fork (I dont want to wait for the process to run). But I would like to make sure that this exec call will not run in the Informix shared memory. Does anyone know if the mi_process_exec() will use shared memory? Thanks, Jim
Jim wrote: Tried this in the datablade forum, but no answer. Thought I would try here also. I would like to start an external process from a trigger. So, I am looking at the example on mi_process_exec() which is supposed to do a fork (I dont want to wait for the process to run). But I would like to make sure that this exec call will not run in the Informix shared memory. Does anyone know if the mi_process_exec() will use shared memory? Thanks, Jim Response: No it shouldn't. The mi_process_exec call will setup some stuff which will cause the adm vp process to fork off a child, only immediately after the fork will that child have access to shared memory, but then it will also immediately do it's execve() call, at which point this new process then loses access to any attached shared memory segments (you should be able to verify this with a man on execve() on your system). Jacques Renaut IBM Informix Advanced Support APD Team
Thanks Jacques! Jim Goldrick Judson University 573-332-7739 http://www.judsonu.edu jgoldrick@judsonu.edu -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of JACQUES RENAUT Sent: Thursday, April 15, 2010 1:32 PM To: ids@iiug.org Subject: Re: mi_process_exec and shared memory [19709] Jim wrote: Tried this in the datablade forum, but no answer. Thought I would try here also. I would like to start an external process from a trigger. So, I am looking at the example on mi_process_exec() which is supposed to do a fork (I don't want to wait for the process to run). But I would like to make sure that this exec call will not run in the Informix shared memory. Does anyone know if the mi_process_exec() will use shared memory? Thanks, Jim Response: No it shouldn't. The mi_process_exec call will setup some stuff which will cause the adm vp process to fork off a child, only immediately after the fork will that child have access to shared memory, but then it will also immediately do it's execve() call, at which point this new process then loses access to any attached shared memory segments (you should be able to verify this with a man on execve() on your system). Jacques Renaut IBM Informix Advanced Support APD Team ************************************************************************ ******* Forum Note: Use "Reply" to post a response in the discussion forum.