Project

General

Profile

Bug #4708

bail if system() or popen()ed programs were killed.

Added by Marc Mengel over 6 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
09/27/2013
Due date:
% Done:

100%

Estimated time:
2.00 h
Spent time:
Duration:

Description

bail if system() or popen()ed programs were killed:

As mentioned, system() ignores SIGINT and SIGQUIT. This may make programs that call it from a loop uninterruptible, unless they take care themselves to check the exit status of the child. E.g.

while (something) {
int ret = system("foo");
if (WIFSIGNALED &&
(WTERMSIG SIGINT || WTERMSIG(ret) SIGQUIT))
break;
}

History

#1 Updated by Marc Mengel over 6 years ago

  • % Done changed from 0 to 90
  • Estimated time set to 2.00 h

I went through all the system() and popen() calls and made sure we were checking the return code for
WIFSIGNALED, and if we were, I throw an exception. Rerunning tests now..

commit: 37f5916

#2 Updated by Marc Mengel over 6 years ago

  • Status changed from New to Resolved
  • % Done changed from 90 to 100

#3 Updated by Marc Mengel about 5 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF