Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Sep 1997 11:50:34 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        grog@lemis.com, peter@spinner.dialix.com.au, atrens@nortel.ca, freebsd-bugs@freebsd.org, gram@cdsec.com, hackers@freebsd.org
Subject:   Re: Bug in malloc/free 
Message-ID:  <13118.874662634@critter.freebsd.dk>
In-Reply-To: Your message of "Fri, 19 Sep 1997 19:09:04 %2B1000." <199709190909.TAA09952@godzilla.zeta.org.au> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <199709190909.TAA09952@godzilla.zeta.org.au>, Bruce Evans writes:
>>  On the other hand, there's not much you can do without calling some
>>  library routine.  POSIX.1 defines "safe" routines that you can call
>>  from a signal handler.  They are:
>>
>>  _exit access alarm cfgetispeed cfgetospeed cfsetispeed cfsetospeed
>>  chdir chmod chown close creat dup dup2 execle execve fcntl fork
>>  fstat getegid geteuid getgid getgroups getpgrp getpid getppid getuid
>>  kill link lseek mkdir mkfifo open pathconf pause pipe read rename
>>  rmdir setgid setpgid setsid setuid sigaction sigaddset sigdelset
>>  sigemptyset sigfillset sigismember sigpending sigprocmask sigsuspend
>>  sleep stat sysconf tcdrain tcflow tcflush tcgetattr tcgetpgrp
>>  tcsendbreak tcsetattr tcsetpgrp time times umask uname unlink utime
>>  wait waitpid write
>>
>>  In addition, System V.4 allows abort, exit, longjmp, and signal.
>>
>>Should we produce some such guidelines?
>
>We claim to be sort of POSIX conformant.  Perhaps this is enough.  We
>aren't actually POSIX conformant.  All the above "safe" routines may
>clobber the global `errno'.
>
>STDC only allows operations on auto variables and assignment to static
>variables of type sig_atomic_t.  We aren't STDC conformant either.
>Operations on auto floating point variables may corrupt the floating
>point state.  This isn't a problem in practice, since nothing useful
>can be done using only auto floating point variables.

You could calculate pi... :-)

--
Poul-Henning Kamp             FreeBSD coreteam member
phk@FreeBSD.ORG               "Real hackers run -current on their laptop."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?13118.874662634>