basic popen / pclose issue
basic popen / pclose issue
- Subject: basic popen / pclose issue
- From: David Alter <email@hidden>
- Date: Fri, 17 Nov 2006 08:40:11 -0800
I think I should start out by saying I do not do a lot of Unix
programming.
I have a FileMaker plugin that starts a separate process. It allows
the separate process to be running after you quit FileMaker. I did
this using popen. This was done for an old style FileMaker plugin
that was built as a CFM. So I had to have some bridge code for it to
make the popen and pclose calls. The call I make to popen is a shell
script that sets up some environment variables and starts a
background server.
Now I'm rewriting the plugin for the new APIs. With the new API I can
build as Moch-O and make POSIX calls. I'm having trouble with popen
working. Maybe it is pclose that is the problem. It is very basic
code I can't imagine what the issue is. Here is the code
FILE *fp = nil;
fp = popen( path.c_str(), "r" );
if ( fp != NULL ) {
pclose(fp);
}
The file opens successfully and launches my process. But It will not
let me close the pipe. I do not need to read anything off the pipe.
If I leave the pipe open it does not let me close the last open
database in FileMaker.
Does anyone have any suggestions.
thanks for the help.
-dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden