forked from pool/fillup
Dirk Mueller
dda254d2ee
- Open all file descriptors with O_CLOEXEC - handle out-of-disk-space situations somewhat better. OBS-URL: https://build.opensuse.org/request/show/70915 OBS-URL: https://build.opensuse.org/package/show/Base:System/fillup?expand=0&rev=12
21 lines
587 B
Diff
21 lines
587 B
Diff
--- SRC/services.c.orig
|
|
+++ SRC/services.c
|
|
@@ -342,7 +342,7 @@ openFileForReading
|
|
{
|
|
Service_t returnValue;
|
|
|
|
- *filePointer = fopen( filename, "r" );
|
|
+ *filePointer = fopen( filename, "re" );
|
|
if( *filePointer == NULL )
|
|
{
|
|
fillup_exception( __FILE__, __LINE__, ServiceException,
|
|
@@ -368,7 +368,7 @@ openFileForWriting
|
|
{
|
|
Service_t returnValue;
|
|
|
|
- *filePointer = fopen( filename, "w" );
|
|
+ *filePointer = fopen( filename, "we" );
|
|
if( *filePointer == NULL )
|
|
{
|
|
fillup_exception( __FILE__, __LINE__, ServiceException,
|