Hi all,

I have an issue with getting a timeout to work with popen.

Code:
alarm(sig_timeout);
read_fp = popen(system_call,"r"); //call to a system command
if (read_fp != NULL)
{
 chars_read = fread(sys_result, sizeof(char), sizeof(sys_result) - 1, read_fp);	
 pclose(read_fp);
}
alarm(0);
The alarm signal is failing to timeout the popen/fread when the system_call hangs. Have I done something wrong?

TIA, rotis23