[Pkg-sysvinit-devel] killall5 mounts /proc

Thomas Hood jdthood at yahoo.co.uk
Tue Jan 24 09:18:05 UTC 2006


To my surprise, killall5 mounts /proc if it isn't already mounted!  Surely this is
something that should be left up to the caller.  I'd like to replace this with a
warning message.

* Main for either killall or pidof. */
int main(int argc, char **argv)
{
	...
        /* First get the /proc filesystem online. */
        mount_proc();
	...
}

int mount_proc(void)
{
	...
        char *args[] = { "mount", "-t", "proc", "proc", "/proc", 0 };
	...
	if (stat("/proc/version", &st) < 0 && errno == ENOENT) {
		...
		execv("/sbin/mount", args);
		execv("/bin/mount", args);
		...
	}
	...
}

-- 
Thomas



More information about the Pkg-sysvinit-devel mailing list