Use of gnome_execute_async and waitpid



In a gnome application I'm using gnome_execute_async to start a child process which generates a file needed later in the program. I've been trying to use waitpid to wait for the child process to finish. The waitpid command returns -1 and an error message that says:
   No child processes
The code that trys to read the file generates an error message that says:
   Cannot open file <filename> (No such file or directory)
The file does get generated in the proper directory, but not in time for the code that needs to read it.

So, I don't understand the problem. Do gnome_execute_async and waitpid not work together? Is there a better way to cause the program to wait for gnome_execute_async to finish?

Thanks.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]