Date: Sun, 18 Jan 2015 20:25:42 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r277339 - user/pho/stress2/misc Message-ID: <201501182025.t0IKPg7V032752@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pho Date: Sun Jan 18 20:25:41 2015 New Revision: 277339 URL: https://svnweb.freebsd.org/changeset/base/277339 Log: Remove trailing blanks and use sig_atomic_t in handler. Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/misc/fragments.sh Modified: user/pho/stress2/misc/fragments.sh ============================================================================== --- user/pho/stress2/misc/fragments.sh Sun Jan 18 20:20:49 2015 (r277338) +++ user/pho/stress2/misc/fragments.sh Sun Jan 18 20:25:41 2015 (r277339) @@ -57,7 +57,7 @@ mount /dev/md${mdstart}$part $mntpoint chmod 777 $mntpoint cd $mntpoint -su $testuser -c "/tmp/fragments" +su $testuser -c "/tmp/fragments" cd $here umount $mntpoint @@ -87,7 +87,7 @@ EOF static pid_t pid; static char *buf; -static int stop; +static volatile sig_atomic_t stop; void handler(int i __unused) { @@ -117,7 +117,7 @@ cleanup(int n) sprintf(file,"t%05d", j); if (stat(file, &sb) != 0) continue; - + if (sb.st_size == 0) { unlink(file); continue; @@ -269,7 +269,7 @@ main() alarm(30 * 60); for (j = 0; j < 50 && stop == 0; j++) { for (i = 0; i < PARALLEL; i++) { - if (fork() == 0) + if (fork() == 0) test(); } for (i = 0; i < PARALLEL; i++)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501182025.t0IKPg7V032752>