roskos@csed-1.UUCP (Eric Roskos) (01/21/88)
This is something that has puzzled me for awhile. If you are logged in under Minix, and you type the character that generates a SIGINT (the DEL key by default), what determines which processes the signal gets distributed to? On the version of Minix I am running the signal only goes to the shell. I thought maybe I'd lost some code when I applied the 1.2 changes, but when I look in the textbook, I can't seem to find it. It looks like the code assumes that there's an "appropriate" process at a process slot whose position depends on the tty the character was typed on, and that it sends the signal to that one, but no other. Is that true, or am I missing something? Can you be certain that the process at a given process slot will always be the right one? (E.g., what if a fork() happens to occur just as your shell exits?) The code I'm looking at at the moment is on line 382 of file tty.c in the version 1.2 sources. -- ------- Eric Roskos, IDA (...dgis!csed-1!roskos or csed-1!roskos@HC.DSPO.GOV)
ast@botter.UUCP (01/24/88)
In article <256@csed-47.csed-1.UUCP> roskos@csed-1.UUCP (Eric Roskos) writes: >This is something that has puzzled me for awhile. > >If you are logged in under Minix, and you type the character that generates >a SIGINT (the DEL key by default), what determines which processes the signal >gets distributed to? Take a look at line 3663 to see the start of chain of calls. There is sort of an implicit assumption that tty line maps one to one with the process owning that one. For n = 1, it is certainly true. Since the distributed version only worked for n = 1, no problems so far. This is not unlike the man who got a contract from NASA to go to the moon by climbing the tallest tree he could fine. For the first few days, he kept sending back progress reports about how well he was doing ... Andy Tanenbaum (ast@cs.vu.nl)