Indeed, here is a snippet OpenBSD's code (@
http://www.openbsd.org/cgi-bin/cvswe...bin/ksh/main.c):
Quote:
int
main(int argc, char *argv[])
{
....
....
kshname = *argv;
....
....
/* Check to see if we're /bin/sh. */
if (!strcmp(&kshname[strlen(kshname) - 3], "/sh") ||
!strcmp(kshname, "sh") || !strcmp(kshname, "-sh")) {
Flag(FSH) = 1;
version_param = "SH_VERSION";
}
|