This is the mail archive of the cygwin-developers@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

EINTR after SIGSTOP/SIGCONT


Hi!

  this program:

===================================================================
#include <errno.h>
#include <stdio.h>
#include <signal.h>

int main ( int argc, char** argv )
{
  char buf[10];
  int pid;
  int a[2];
  int rc;

  pipe ( a );
  pid = fork ();
  if ( pid == 0 )
    {
      rc = read ( a[0], buf, 1 );
      if ( rc < 0 ) perror ( "error reading from pipe" );
    }
  else  
    {
      kill ( pid, SIGSTOP );
      sleep(1);
      kill ( pid, SIGCONT );
      sleep(1);
      write ( a[1], buf, 1 );
      waitpid ( pid );
    }
}
===================================================================

prints `error reading from pipe: Interrupted system call' on cygwin
and  none  on linux. is it intended behavior, or cygwin shouldn't post
"signal_arrived" event on SIGCONT signal?

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]