LO 4.3.3.2 English Writer
Ubuntu 14.10 English
I have a program that forks and spawns a Writer instance, and I’d like to be able to determine when the user has terminated the instance.
int status;
switch ( status = fork () ) {
case 0:
// child
execlp ( "lowriter", "lowriter", "test.odt", NULL );
_exit ( EXIT_FAILURE );
break;
default:
waitpid ( status, &status, 0 );
break;
}
The problem is that waitpid() returns EXIT_SUCCESS immediately, rather than waiting for the Writer window to be closed.
Any ideas?