On Tue, Jan 17, 2012 at 01:50:52PM -0600, Chris Muller wrote:
> Not sure if this would meet your needs, but I know something we did
> was to be able to send Linux interrupt signals to the vm, which would
> at the image level result in a process waiting on a Semaphore specific
> that interrupt to be signaled.
Here is how to do it:
[[OSProcess accessor forwardSigUsr1 wait.
Project current addDeferredUIMessage: [self notify: 'Got a SIGUSR1!!!!']]
ensure: [OSProcess accessor restoreSigUsr1]] fork
Then send a SIGUSR1 to your VM process. A notifier will be raised,
after which the signal handler will be restored to its original value.
The signal handler methods set an OS signal handler in the VM and
answer a semaphore that will be signaled in the image when an OS signal
is received by the VM (SIGUSR1 in this example). The signal restore
methods return the signal handlers to whatever they had originally
been set to.
Dave
_______________________________________________
VM-beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners