![]() | ||||||||||
Messages in this thread |
Hi Jesper, Em Seg, 2003-12-22 às 21:01, Jesper Juhl escreveu: > One thing I noticed. > > I'm looking at include/signal.h from linux-0.01 and the definition of the > signal() function, the prototype in include/signal.h is > > void (*signal(int _sig, void (*_func)(int)))(int); > > I then take a look in my copy of UNIX Network Programming by W. Richard > Stevens from 1990, and notice that he on page 46 says this : > > "... > A process specifies how it wants a signal handled by calling the signal > system call. > > #include <signal.h> > > int (*signal (int sig, void (*func)(int)))(int); > > ..." > > > The return type here is "int" while Linus originally made the return type > "void". If Linus had copied signal.h from UNIX the return type would have > been "int"... Seems to me the Linus version comes from Minix. Its return type is void too: http://www.minix-vmd.org/source/std/1.5/include/signal.h -- Luiz Fernando N. Capitulino <lcapitulino@prefeitura.sp.gov.br> <http://www.telecentros.sp.gov.br> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ | |||||||||
| Last update: 2005-03-22 12:59 [from the cache] ©2003-2008 | ||||||||||