add a 'safe_system' function which avoids leaking FDs

This commit is contained in:
Stefan Seyfried
2011-12-04 16:24:57 +01:00
parent 4d9be7852d
commit 60454a643c
3 changed files with 38 additions and 0 deletions

11
src/system/safe_system.h Normal file
View File

@@ -0,0 +1,11 @@
#ifndef _SAFE_SYSTEM_H_
#define _SAFE_SYSTEM_H_
#ifdef __cplusplus
extern "C"
{
#endif
extern int safe_system(const char *);
#ifdef __cplusplus
}
#endif
#endif