/**********************************************************************
 * do_unix.c  -- SS command for running a unix command
 * tty lucy client using SS library
 *
 * $Author: brlewis $
 * $Source: /afs/athena.mit.edu/astaff/project/lucydev/src/tty/do_unix.c,v $
 * $Header: /afs/athena.mit.edu/astaff/project/lucydev/src/tty/do_unix.c,v 1.1 91/09/24 14:47:55 brlewis Exp Locker: brlewis $
 *
 * Copyright 1991 by the Massachusetts Institute of Technology.
 *
 * For copying and distribution information, please see the file
 * <mit-copyright.h>.
 **********************************************************************/
#include <mit-copyright.h>

#ifndef lint
static char rcsid_do_unix_c[] = "$Header: /afs/athena.mit.edu/astaff/project/lucydev/src/tty/do_unix.c,v 1.1 91/09/24 14:47:55 brlewis Exp Locker: brlewis $";
#endif /* lint */

#include <sys/wait.h>
#include <ss/ss.h>
#include "lucy/lucy.h"
#include "config.h"

/*ARGSUSED*/
void
do_unix(argc, argv)
     int argc;
     char *argv[];
{
  int pid;

  /* fork off process */
  if ((pid=vfork()) == 0) {
    execvp(argv[0], argv);
    perror(argv[0]);
    _exit(1);
  }

  /* wait for it to exit */
  while (wait(0) != pid);
  return;
}
