Open pid file wronly

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17434 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2003-08-06 05:39:51 +00:00
parent 3767bc44fc
commit edfa10c7fe

View file

@ -4576,7 +4576,7 @@ printf(
if (getuid () == 0) if (getuid () == 0)
#endif #endif
{ {
int desc = open(pidfile, O_EXCL|O_CREAT, 0644); int desc = open(pidfile, O_EXCL|O_CREAT|O_WRONLY, 0644);
fptr = fdopen(desc, "w"); fptr = fdopen(desc, "w");
if (fptr == 0) if (fptr == 0)