_execn.c 436 B

12345678910111213141516
  1. #include <lib.h>
  2. #define PTRSIZE sizeof(char *)
  3. _PROTOTYPE( int _execn, (char * name));
  4. PUBLIC int _execn(name)
  5. char *name; /* pointer to file to be exec'd */
  6. {
  7. /* Special version used when there are no args and no environment. This call
  8. * is principally used by INIT, to avoid having to allocate ARG_MAX.
  9. */
  10. PRIVATE char stack[3 * PTRSIZE];
  11. return(_callm1(MM, EXEC, _len(name), sizeof(stack), 0, name, stack, NIL_PTR));
  12. }