The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > BSD
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 08-08-2005
hadarot hadarot is offline
Registered User
 

Join Date: Jul 2005
Posts: 33
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";
}

Last edited by hadarot; 08-12-2005 at 12:59 AM.
Reply With Quote