Subject: Re: sysv ps(1) implementation [was: ps(1) sysv silliness]
To: Greywolf <>
From: Andrew Brown <>
List: tech-userlevel
Date: 06/09/2000 14:52:10
>[mkdir/mknod not; i remember now it was that mkdir had to be setuid
> because the _rename_ call hadn't been implemented yet, that was it!
> so mkdir was, more or less (modulo GC and error checking)
>	char *cp;
> 	mkdir(path);
>	link(path, cp = strspl(path, "/."));
>	link(getcwd(), cp = strspl(path, "/.."));

i'm sure someone will correct if i'm wrong, but wasn't it more like

 	system("mkdir path"); /* with some sprintf() magic */
	chown(getuid(), path);
	chgrp(getgid(), path);

because mkdir (the program) actually did

	char *cp;
	mknod(path, 0777, however_you_describe_a_directory);
	link(path, cp = strspl(path, "/."));
	link(getcwd(), cp = strspl(path, "/.."));

since mknod was used to make directories and was limited to use by
root processes?

ps - what's strspl()?

|-----< "CODE WARRIOR" >-----|             * "ah!  i see you have the internet (Andrew Brown)                that goes *ping*!"       * "information is power -- share the wealth."