Hello,
I am trying to get result status from system(my_exe) on Solaris. I want to detect if `my_exe` gives exception/core dump...So I created dummy exe which has zero division operation.
And then I run it with system().
The problem is that I can't detect the exception. My code is like:
int status = system("./my_exe");
printf("WIFEXITED=%d\n", WIFEXITED(status) );
the macro WIFEXITED always gives 1 !
On Linux it becomes 0, and I can WTERMSIG() then. But I cant achieve this on Solaris.
I tried different ways to kill/stop the executed process - WIFEXITED is always 1.
thanks for any help