copyroot = FSCopy(©hlinks, mfscopy);
signal(SIGUSR1, started);
kill(child, SIGUSR1);
- while (waitpid(child, &status, WNOHANG) != child)
+ while (waitpid(child, &status, 0) != child)
;
exit(WEXITSTATUS(status));
/* NOTREACHED */
/*
* Notify parent process of success.
* Dissociate from session and tty.
+ *
+ * NOTE: We are the child and may receive a SIGINT due
+ * to losing the tty session? XXX
*/
if (mfs) {
+ /* YYY */
kill(mfs_ppid, SIGUSR1);
setsid();
close(0);
close(1);
close(2);
chdir("/");
+ /* returns to mount_mfs (newfs) and issues the mount */
}
}
#ifdef MFS
if (mfs) {
struct mfs_args args;
- int udev;
+
+ bzero(&args, sizeof(args));
snprintf(mfsdevname, sizeof(mfsdevname), "/dev/mfs%d",
getpid());
if (error)
fatal("mfs filesystem not available");
+#if 0
+ int udev;
udev = (253 << 8) | (getpid() & 255) |
((getpid() & ~0xFF) << 8);
if (mknod(mfsdevname, S_IFCHR | 0700, udev) < 0)
printf("Warning: unable to create %s\n", mfsdevname);
+#endif
signal(SIGINT, mfsintr);
if (mount(vfc.vfc_name, argv[1], mntflags, &args) < 0)
fatal("%s: %s", argv[1], strerror(errno));
{
if (filename)
munmap(membase, fssize * sectorsize);
+#if 0
remove(mfsdevname);
+#endif
}
#endif