Date: Fri, 27 Jul 2001 01:58:02 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Warner Losh <imp@harmony.village.org> Cc: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>, Kris Kennaway <kris@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/sys sigaction.2 Message-ID: <Pine.BSF.4.21.0107270147410.50696-100000@besplex.bde.org> In-Reply-To: <200107251439.f6PEdro07401@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 25 Jul 2001, Warner Losh wrote: > In message <Pine.BSF.4.21.0107251900590.48176-100000@besplex.bde.org> Bruce Evans writes: > : > Are these functions officially signal-safe, or just signal-safe in our > : > particular implementation? > : > : Only in our implementation. It's hard to see how strcpy() could be > : signal-unsafe, but POSIX doesn't require it to be signal-safe. > > Strcpy isn't atomic. So if the source string changes in a signal > handler, unpredictable results will ensue. That doesn't make it signal-unsafe any more than the possibility of open(2)'s string arg changing makes open(2) signal-unsafe. open(2) _is_ one of the functions specified by POSIX to be signal-safe. Signal-safety has something to do with not having internal safe which might be corrupted by using the function in a signal handler or which might be in an inconsistent state when the function is called from a signal handler. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0107270147410.50696-100000>