[Rd] 2 questions about signal & broken connection in R

2013-08-14 Thread Rong lI Li
Hi, all, I have 2 questions about signal handling in R. Would you pls help give me some suggestions? Many thanks! [How to block the signal in one R function]: If one R function hopes to be running without interrupting, how can we avoid this? To be more specific, for one R function "func1", it w

Re: [Rd] Ctrl+C in R will terminate the child process which is spawned by using "pipe"

2013-07-04 Thread Rong lI Li
Hi, all, My previous question is: "how to make the child process run happily without being terminated, after hit Ctrl+C in R". For this, I tried both "setsid" and blocking signals in the child process. Both of them can solve this issue. Considering the compatibility between Unix/Linux platform a

[Rd] Ctrl+C in R will terminate the child process which is spawned by using "pipe"

2013-07-02 Thread Rong lI Li
Hi, all, I pressed Ctrl+C in R process, and found that the child process which was spawned by using "pipe" is terminated due to this. Are there any way to work around it, so that the child process can run happily without being terminated? Or can we block the signal for the child process? 1. I us

Re: [Rd] How can C++ read the R object written into socket with saveRDS or save

2013-06-28 Thread Rong lI Li
Hi, all, Many thanks for your suggestions/infos! For my previous question: "how to get the size of R object, so that the C++ process can know exact bytes to read, and receive the R objectvia socket connection", for now, I used the following way to achieve this. It worked for me. Pls feel free t

[Rd] How can C++ read the R object written into socket with saveRDS or save

2013-06-26 Thread Rong lI Li
Hi, all, Recently, I met one issue when using socket between R & C++ to transmit R object. Would you pls help give me some suggestions? Many thanks! [Background]: I create a socket connection between R & C++ binary first, and then, want to use saveRDS() or save() in R to save the object into con