fstat(2) after open(2) for set -C case when initial stat(2) was !S_ISREG

to fix race condition as suggested by jilles
This commit is contained in:
tg
2015-12-31 21:03:47 +00:00
parent c56d848a10
commit 4059e105a2
3 changed files with 37 additions and 15 deletions

4
sh.h
View File

@@ -175,9 +175,9 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.751 2015/12/12 22:25:15 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.752 2015/12/31 21:03:47 tg Exp $");
#endif
#define MKSH_VERSION "R52 2015/12/12"
#define MKSH_VERSION "R52 2015/12/31"
/* arithmetic types: C implementation */
#if !HAVE_CAN_INTTYPES