From owner-svn-src-user@FreeBSD.ORG Tue Feb 16 11:33:18 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC97810656A3; Tue, 16 Feb 2010 11:33:18 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DCF398FC16; Tue, 16 Feb 2010 11:33:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GBXIZi008496; Tue, 16 Feb 2010 11:33:18 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GBXI7M008493; Tue, 16 Feb 2010 11:33:18 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201002161133.o1GBXI7M008493@svn.freebsd.org> From: Ed Schouten Date: Tue, 16 Feb 2010 11:33:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203956 - user/ed/newcons/lib/libc/gen X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 11:33:19 -0000 Author: ed Date: Tue Feb 16 11:33:18 2010 New Revision: 203956 URL: http://svn.freebsd.org/changeset/base/203956 Log: Add missing volatile keywords. According to GCC, these variables may be clobbered by vfork(). Modified: user/ed/newcons/lib/libc/gen/popen.c user/ed/newcons/lib/libc/gen/posix_spawn.c Modified: user/ed/newcons/lib/libc/gen/popen.c ============================================================================== --- user/ed/newcons/lib/libc/gen/popen.c Tue Feb 16 09:31:36 2010 (r203955) +++ user/ed/newcons/lib/libc/gen/popen.c Tue Feb 16 11:33:18 2010 (r203956) @@ -66,12 +66,12 @@ static pthread_mutex_t pidlist_mutex = P #define THREAD_UNLOCK() if (__isthreaded) _pthread_mutex_unlock(&pidlist_mutex) FILE * -popen(command, type) - const char *command, *type; +popen(const char *command, const char * volatile type) { struct pid *cur; FILE *iop; - int pdes[2], pid, twoway; + int pdes[2], pid; + volatile int twoway; char *argv[4]; struct pid *p; Modified: user/ed/newcons/lib/libc/gen/posix_spawn.c ============================================================================== --- user/ed/newcons/lib/libc/gen/posix_spawn.c Tue Feb 16 09:31:36 2010 (r203955) +++ user/ed/newcons/lib/libc/gen/posix_spawn.c Tue Feb 16 11:33:18 2010 (r203956) @@ -192,7 +192,7 @@ static int do_posix_spawn(pid_t *pid, const char *path, const posix_spawn_file_actions_t *fa, const posix_spawnattr_t *sa, - char * const argv[], char * const envp[], int use_env_path) + char * const argv[], char * const * volatile envp, int use_env_path) { pid_t p; volatile int error = 0;