Register pointers in gcc?
I was looking at the disklabel(8) source today and found this in
editit():
if (pid == 0) {
register char *ed;
sigsetmask(omask);
setgid(getgid());
setuid(getuid());
if ((ed = getenv("EDITOR")) == (char *)0)
ed = DEFEDITOR;
execlp(ed, ed, tmpfil, 0);
perror(ed);
exit(1);
}
How come I can stuff anything into EDITOR and not cause disklabel
to segfault? I've setenv EDITOR to 16K strings and it just complains
that the argument list is too long, or that the editor does not exist.
Where is it storing the contents of getenv("EDITOR")?
--
Brian Tao (BT300, taob@risc.org)
"Though this be madness, yet there is method in't"
Received on Sun Feb 16 10:10:46 1997
This archive was generated by hypermail 2.1.8
: Wed Aug 23 2006 - 12:41:02 EDT
|