version 1.1, 1995/10/18 08:46:58 |
version 1.2, 1995/12/26 18:00:30 |
|
|
/* $NetBSD: wwenviron.c,v 1.3 1995/09/28 10:35:27 tls Exp $ */ |
/* $NetBSD: wwenviron.c,v 1.4 1995/12/21 08:39:50 mycroft Exp $ */ |
|
|
/* |
/* |
* Copyright (c) 1983, 1993 |
* Copyright (c) 1983, 1993 |
|
|
#if 0 |
#if 0 |
static char sccsid[] = "@(#)wwenviron.c 8.1 (Berkeley) 6/6/93"; |
static char sccsid[] = "@(#)wwenviron.c 8.1 (Berkeley) 6/6/93"; |
#else |
#else |
static char rcsid[] = "$NetBSD: wwenviron.c,v 1.3 1995/09/28 10:35:27 tls Exp $"; |
static char rcsid[] = "$NetBSD: wwenviron.c,v 1.4 1995/12/21 08:39:50 mycroft Exp $"; |
#endif |
#endif |
#endif /* not lint */ |
#endif /* not lint */ |
|
|
|
|
int pgrp = getpid(); |
int pgrp = getpid(); |
#endif |
#endif |
char buf[1024]; |
char buf[1024]; |
|
sigset_t sigset; |
|
|
#ifndef TIOCSCTTY |
#ifndef TIOCSCTTY |
if ((i = open("/dev/tty", 0)) < 0) |
if ((i = open("/dev/tty", 0)) < 0) |
|
|
#endif |
#endif |
/* SIGPIPE is the only one we ignore */ |
/* SIGPIPE is the only one we ignore */ |
(void) signal(SIGPIPE, SIG_DFL); |
(void) signal(SIGPIPE, SIG_DFL); |
(void) sigsetmask(0); |
sigemptyset(&sigset); |
|
sigprocmask(SIG_SETMASK, &sigset, (sigset_t *)0); |
/* |
/* |
* Two conditions that make destructive setenv ok: |
* Two conditions that make destructive setenv ok: |
* 1. setenv() copies the string, |
* 1. setenv() copies the string, |