On 2012-08-10 10:13, Alexander Dreyer wrote:
> When I was wandering around in recent Singular sources (there's an spkg
> update pending) I came around an issue I had never deals with before.
> The question is how to handle signals, when fork is used? Or more
> generally: What to do with signals, when system calls occur? Indeed, one
> can switch interrupts etc. off for the time being. But what about long
> lasting calls, for instance in the case that a forked child process is
> waiting for user input. I post the problem here, because I thing a block
> Libsingular, will block Sage as well. IMHO the principal problem is of
> general interest anyway.
> 
> Had this been discussed before? Does anyone know about best practices?
If it's truly a fork(), then you get essentially two independent
processes with their own indepdendent signal handlers.
If you mean threads, that's another story and signal handling for
threads is currently not supported in Sage.

"signal handling during system calls" is a very general question, it's
hard to give general advice. Within Sage, the sig_on()/sig_off()
mechanism seems to work well, even when system calls are involved.

-- 
-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org



Reply via email to