#include <assert.h>
#include <fcntl.h>
#include <libgen.h>
+#include <signal.h>
#define ENSC_WRAPPERS_PREFIX "chcontext: "
#define ENSC_WRAPPERS_VSERVER 1
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;
#include <ctype.h>
#include <sys/wait.h>
#include <libgen.h>
+#include <signal.h>
#define MNTPOINT "/etc"
return EXIT_FAILURE;
}
+ signal(SIGCHLD, SIG_DFL);
+
while (1) {
int c = getopt_long(argc, argv, "ht:nao:", CMDLINE_OPTIONS, 0);
if (c==-1) break;
#include <sys/socket.h>
#include <sys/un.h>
#include <assert.h>
+#include <signal.h>
#define ENSC_WRAPPERS_PREFIX "vcontext: "
#define ENSC_WRAPPERS_UNISTD 1
}
}
+ signal(SIGCHLD, SIG_DFL);
+
if (args.do_migrateself)
args.xid = Evc_get_task_xid(0);
inline static ALWAYSINLINE int
kill_wrapper_legacy(xid_t UNUSED xid, char const *proc, int UNUSED sig)
{
- pid_t pid = fork();
- if (pid==-1) {
- perror("vkill: fork()");
- exit(1);
- }
- else if (pid==0) {
+ pid_t pid;
+
+ signal(SIGCHLD, SIG_DFL);
+ pid = Efork();
+
+ if (pid==0) {
int status;
int res;
while ((res=wait4(pid, &status, 0,0))==-1 &&