new statistics
[unix-history] / usr / src / games / trek / shell.c
CommitLineData
bb0cfa24
DF
1/*
2 * Copyright (c) 1980 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5 */
6
9d9faa64 7#ifndef lint
bb0cfa24 8static char sccsid[] = "@(#)shell.c 5.1 (Berkeley) %G%";
9d9faa64
KM
9#endif not lint
10
11/*
12** CALL THE SHELL
13*/
14
15shell()
16{
17 int i;
18 register int pid;
19 register int sav2, sav3;
20
21 if (!(pid = fork()))
22 {
23 setuid(getuid());
24 nice(0);
773f1498
KL
25 execl("/bin/csh", "-", 0);
26 syserr("cannot execute /bin/csh");
9d9faa64
KM
27 }
28 sav2 = signal(2, 1);
29 sav3 = signal(3, 1);
30 while (wait(&i) != pid) ;
31 signal(2, sav2);
32 signal(3, sav3);
33}