-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
In the following program, the child process hangs on margo_finalize. It only happens if the instance uses a progress thread.
#include <time.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <margo.h>
int main(int argc, char** argv) {
pid_t pid = getpid();
printf("%d: before margo_init\n", pid);
margo_instance_id mid = margo_init("na+sm", MARGO_CLIENT_MODE, true, 0);
printf("%d: before fork\n", pid);
pid_t p = fork();
if(p < 0 ) {
perror("fork fail");
exit(1);
}
pid = getpid();
printf("%d: before margo_finalize\n", pid);
margo_finalize(mid);
printf("%d: before wait\n", pid);
if(p > 0) wait(NULL);
printf("%d: all done\n", pid);
return 0;
}
Metadata
Metadata
Assignees
Labels
No labels