pcurrent.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1992 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <signal.h>
#include <errno.h>
#include "wish.h"
#include "token.h"
#include "slk.h"
#include "actrec.h"
#include "proc.h"
#include "procdefs.h"
#include "terror.h"
#include "sizes.h"
extern bool Suspend_interupt;
extern char *Suspend_window;
/* extern int errno; EFT abs k16 */
int
{
int status;
extern int _Debug;
void sigcatch();
int set_ret_val();
return(FAIL);
/* if process is not already forked, fork it else resume it */
fork_clrscr();
#ifdef _DEBUG
#endif
case FAIL:
#ifdef _DEBUG
#endif
return(FAIL);
case 0: /* child */
#ifdef _DEBUG
if (_Debug)
#endif
_exit(255);
default:
break;
}
} else { /* resume */
#ifdef _DEBUG
#endif
printf("You are returning to a suspended activity. This activity\r\n");
printf("must be ended before you can complete logging out.\r\n");
printf("Please take whatever steps are necessary to end this\r\n");
printf("activity.\r\n\n");
sleep(3);
} else {
printf("You are returning to a suspended activity. \r\n");
sleep(3);
}
#ifdef _DEBUG
#endif
return(FAIL);
}
}
#ifdef _DEBUG
#endif
status = 0;
#ifdef _DEBUG
#endif
break;
}
}
if (Suspend_interupt) {
#ifdef _DEBUG
#endif
if (Suspend_window == NULL)
ar_backup(); /* go back to previous activation record */
else {
}
} else {
(void) set_ret_val(status);
#ifdef _DEBUG
#endif
printf("\r\nPress ENTER to continue");
}
}
/* signal(SIGINT, oldint);
signal(SIGQUIT, oldquit);
abs */
return(SUCCESS);
}
int sig;
{
/* signal(sig, SIG_IGN);
signal(sig, sigcatch);
abs */
}