#include <assert.h>
#include <fcntl.h>
#include <libgen.h>
+#include <signal.h>
#define ENSC_WRAPPERS_PREFIX "chcontext: "
#define ENSC_WRAPPERS_VSERVER 1
if (err.ptr!=0) {
WRITE_MSG(2, "Unknown flag '");
- write(2, err.ptr, err.len);
+ Vwrite(2, err.ptr, err.len);
WRITE_MSG(2, "'\n");
exit(wrapper_exit_code);
}
l = utilvserver_fmt_long(buf,ctx);
WRITE_MSG(1, "New security context is ");
- write(1, buf, l);
+ Vwrite(1, buf, l);
WRITE_MSG(1, "\n");
}
pid_t pid;
global_args = &args;
-
+ signal(SIGCHLD, SIG_DFL);
+
while (1) {
int c = getopt_long(argc, argv, "+", CMDLINE_OPTIONS, 0);
if (c==-1) break;