Skip site navigation (1)Skip section navigation (2)
Date:      07 Aug 2001 23:46:57 +0200
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Warner Losh <imp@harmony.village.org>, 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:  <xzpk80fee5q.fsf@flood.ping.uio.no>
In-Reply-To: <Pine.BSF.4.21.0107270147410.50696-100000@besplex.bde.org>
References:  <Pine.BSF.4.21.0107270147410.50696-100000@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans <bde@zeta.org.au> writes:
> On Wed, 25 Jul 2001, Warner Losh wrote:
> > 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.

No, but open(2) is uninterruptible while strcpy(3) isn't.  If a signal
occurs while strcpy(3) is running, and it modifies the source string,
the consequences may be very unpleasant.

DES
-- 
Dag-Erling Smorgrav - des@ofug.org

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?xzpk80fee5q.fsf>