Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site decvax.UUCP Path: utzoo!linus!decvax!minow From: minow@decvax.UUCP (Martin Minow) Newsgroups: net.micro.68k Subject: Re: Re: nargs - (nf) Message-ID: <320@decvax.UUCP> Date: Thu, 29-Dec-83 21:53:15 EST Article-I.D.: decvax.320 Posted: Thu Dec 29 21:53:15 1983 Date-Received: Fri, 30-Dec-83 02:22:21 EST References: <2113@fortune.UUCP> Organization: DEC UNIX Engineering Group Lines: 28 fortune!shah suggests using an nargs() function when creating processes in an operating system. For example (changing his slightly) procid = create_process(main_function, priority, stacksize, arg0, arg1, ... argn); Then, when the process starts, it is called as main_function(arg0, arg1, ... argn); A simpler solution, (which does require that you can access arguments in sequence) would be as follows: procid = create_process(main_function, priority, stacksize, argc, arg0, arg1, ... argn); The main_function would be called as main_function(argc, argv) int argc; char *argv[]; The implementation is quite straight-forward. Martin Minow decvax!minow