removed support for -r, -h, and rmail
[unix-history] / usr / src / games / trek / shell.c
CommitLineData
bb0cfa24
DF
1/*
2 * Copyright (c) 1980 Regents of the University of California.
e9fb6bea
KB
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms are permitted
6 * provided that this notice is preserved and that due credit is given
7 * to the University of California at Berkeley. The name of the University
8 * may not be used to endorse or promote products derived from this
9 * software without specific prior written permission. This software
10 * is provided ``as is'' without express or implied warranty.
bb0cfa24
DF
11 */
12
9d9faa64 13#ifndef lint
e9fb6bea
KB
14static char sccsid[] = "@(#)shell.c 5.2 (Berkeley) %G%";
15#endif /* not lint */
9d9faa64
KM
16
17/*
18** CALL THE SHELL
19*/
20
21shell()
22{
23 int i;
24 register int pid;
25 register int sav2, sav3;
26
27 if (!(pid = fork()))
28 {
29 setuid(getuid());
30 nice(0);
773f1498
KL
31 execl("/bin/csh", "-", 0);
32 syserr("cannot execute /bin/csh");
9d9faa64
KM
33 }
34 sav2 = signal(2, 1);
35 sav3 = signal(3, 1);
36 while (wait(&i) != pid) ;
37 signal(2, sav2);
38 signal(3, sav3);
39}