Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!rutgers!dayton!viper!john From: john@viper.Lynx.MN.ORG (John Stanley) Newsgroups: comp.sys.atari.st Subject: Re: _shell_p standardization: a suggestion Message-ID: <1042@viper.Lynx.MN.ORG> Date: Mon, 25-May-87 02:08:51 EDT Article-I.D.: viper.1042 Posted: Mon May 25 02:08:51 1987 Date-Received: Tue, 26-May-87 00:46:35 EDT References: <2124@cwruecmp.UUCP> Reply-To: john@viper.UUCP (John Stanley) Organization: DynaSoft Systems Lines: 39 Keywords: Gulam, _shell_p, system() In article <2124@cwruecmp.UUCP> pm@cwruecmp.UUCP (Prabhaker Mateti) writes: >I would like to suggest the following usage for _shell_p. > >------------------------------------------------------------------ >[description of method] >-------------------------------------------------------------------- > > >At the moment I don't see any flaws in the scheme. I plan to implement >this scheme in the next release of Gulam. > No, No, No...!! PLEASE don't even think about doing it that way. There -is- one MAJOR flaw... It's -totaly- incompatable with the existing reciently described use for the _shell_p variable! You -could- modify your method to be compatable, but the method you described will consistantly fool any program correctly using _shell_p into crashing. The easiest method to identify the shell that won't effect any programs in a negative way would be to define a command that could be passed to the shell. The shell would then pass back either an error code, nothing, or (if it's a shell that supports this) a pointer to an identification block similar to the one you mentioned in your idea. The command should be something not likely to blow up stupid shells, but also not something likely to ever be used as a real command line. A possibility would be shell("\n\007\007\007WRU?"). I would also recommend using something for the MAGIC number less likely to be found randomly in a shell program. If you're interested, I'd be willing to create a few code samples to demonstrate how this could be done. Please let me know... --- John Stanley (john@viper.UUCP) Software Consultant - DynaSoft Systems UUCP: ...{amdahl,ihnp4,rutgers}!{meccts,dayton}!viper!john