From c@@rd|@g@bor @end|ng |rom gm@||@com  Tue Apr 30 21:44:35 2019
From: c@@rd|@g@bor @end|ng |rom gm@||@com (=?UTF-8?B?R8OhYm9yIENzw6FyZGk=?=)
Date: Tue, 30 Apr 2019 20:44:35 +0100
Subject: [Rd] Background R session on Unix and SIGINT
Message-ID: <CABtg=Km=Bj_gDr3jsYSvQf479eJhPunRYyU8UQEfaV-YtKvqqQ@mail.gmail.com>

Hi All,

I realize that this is not a really nice reprex, but anyone has an
idea why a background R session would "remember" an interrupt (SIGINT)
on Unix?

rs <- callr::r_session$new()
rs$interrupt()     # just sends a SIGINT
#> [1] TRUE

rs$run(function() 1+1)
#> Error: interrupt

rs$run(function() 1+1)
#> [1] 2

It seems that the main loop somehow stores the SIGINT it receives
while it is waiting on stdin, and then it triggers it when some input
comes in.... Maybe. Just speculating....

Thanks,
Gabor



[Rd] Background R session on Unix and SIGINT
=?UTF-8?B?R8OhYm9yIENzw6FyZGk=?=