Re: Linux doing "cooperative multitasking"? (More info)

joost witteveen (joost@rulcmc.leidenuniv.nl)
Wed, 27 Nov 1996 17:32:09 +0100 (MET)


>
>
> Hallo,
> in a previous message I said:
> I start netscape on an rxvt-Term. I forgot to send it in the Background by
> not giving "&" at the end of the command line. So I hit "^Z" on the terminal I
> started netscape. Nothing happens for a long time or at all.
>
> To be more exact: The command prompt dosen't return.
>
> So I can "bg" as proposed by some people.

Try to run the following programme:

#include <signal.h>
#include <stdio.h>
void handler(int i){
printf("One more minute, I don't want to die yet, let me just check my mail..\n");
signal(20,handler);
}
main(){
signal(20,handler);
while(1);
}

This will show you that it's nothing magic that Netscape is doing:
it's just handling the signal 20's yourre sending to it by
pressing ^Z. Anyone can do that, even netscape!

-- 
joost witteveen
            joost@rulcmc.leidenuniv.nl
          joostje@debian.org
--
Use Debian/GNU Linux!