A method for signal handling in a host operating system containing an operating system process, wherein the operating system process is executing application code portions, guest operating system code portions, and system calls of the host operating system, the application code portions being able to invoke the guest operating system code portions by system calls of the guest operating system, which is embedded in the host operating system, the operating system process having a worker thread dedicated to executing the application code portions such that when started then the worker thread creating an associated signal-waiter thread dedicated to handling specific signals from the host operating system, the signal-waiter thread is masked to signals from the guest operating system and the worker thread being masked to signals from the host operating system to the operating system process to prevent interruption of the flow of execution of the worker thread, the method comprising the step of the signal-waiter thread catching a specific signal from the host operating system, the method being characterized in that it comprises further steps of: - the signal-waiter thread maps the signal number of the caught signal from the host operating system onto an adapted signal number of the guest operating system as defined by the operating systems - in response to the specific caught signal while the worker thread is executing a system call of the host operating system during which it is masked to signals from the guest operating system, ∘ the signal-waiter thread protecting the worker thread from executing application code portions and system calls of the guest operating system by a mutual execution exclusion locking mechanism (115; 117,122) designed to only allow one thread to execute application code portions and system calls of the guest operating system until the signal-waiter thread executes code portions for handling signals from the guest operating system adapted to the specific signal from the host operating system, ∘ the signal-waiter thread invokes the signal handler of the guest operating system, ∘ the signal-waiter thread allowing the worker thread to execute application code portions and system calls of the guest operating system after the signal-waiter thread has finished handling the specific signal, - in response to the specific signal caught while the worker thread is not executing a system call of the host operating system, ∘ the signal-waiter thread broadcasts the mapped signal in the guest operating system and the worker thread catches the signal from the signal-waiter thread and calls the signal handler of the guest operating system before it continues the application program in the guest operating system. - the signal-waiter thread maps the signal number of the caught signal from the host operating system onto an adapted signal number of the guest operating system as defined by the operating systems - in response to the specific caught signal while the worker thread is executing a system call of the host operating system during which it is masked to signals from the guest operating system, ∘ the signal-waiter thread protecting the worker thread from executing application code portions and system calls of the guest operating system by a mutual execution exclusion locking mechanism (115; 117,122) designed to only allow one thread to execute application code portions and system calls of the guest operating system until the signal-waiter thread executes code portions for handling signals from the guest operating system adapted to the specific signal from the host operating system, ∘ the signal-waiter thread invokes the signal handler of the guest operating system, ∘ the signal-waiter thread allowing the worker thread to execute application code portions and system calls of the guest operating system after the signal-waiter thread has finished handling the specific signal, ∘ the signal-waiter thread protecting the worker thread from executing application code portions and system calls of the guest operating system by a mutual execution exclusion locking mechanism (115; 117,122) designed to only allow one thread to execute application code portions and system calls of the guest operating system until the signal-waiter thread executes code portions for handling signals from the guest operating system adapted to the specific signal from the host operating system, ∘ the signal-waiter thread invokes the signal handler of the guest operating system, ∘ the signal-waiter thread allowing the worker thread to execute application code portions and system calls of the guest operating system after the signal-waiter thread has finished handling the specific signal, - in response to the specific signal caught while the worker thread is not executing a system call of the host operating system, ∘ the signal-waiter thread broadcasts the mapped signal in the guest operating system and the worker thread catches the signal from the signal-waiter thread and calls the signal handler of the guest operating system before it continues the application program in the guest operating system. ∘ the signal-waiter thread broadcasts the mapped signal in the guest operating system and the worker thread catches the signal from the signal-waiter thread and calls the signal handler of the guest operating system before it continues the application program in the guest operating system.