version 0.28.192
[util-vserver.git] / util-vserver / src / wrappers.h
index 90d598d..a0b4e22 100644 (file)
@@ -34,6 +34,7 @@
 #include <sys/wait.h>
 #include <sys/stat.h>
 #include <sys/mount.h>
+#include <sys/ioctl.h>
 
 #define WRAPPER_DECL   UNUSED ALWAYSINLINE
 
@@ -265,6 +266,22 @@ Emkstemp(char *template)
   return res;
 }
 
+inline static WRAPPER_DECL void
+Eioctl(int fd, int request, void *p)
+{
+  int   res = ioctl(fd, request, p);
+  FatalErrnoError(res<0, "ioctl()");
+}
+
+inline static WRAPPER_DECL pid_t
+Esetsid()
+{
+  register pid_t const  res = setsid();
+  FatalErrnoError(res==-1, "setsid()");
+
+  return res;
+}
+
 #undef WRAPPER_DECL
 
 #endif //  H_UTIL_VSERVER_SRC_WRAPPERS_H