sh.proc.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright 1999 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley Software License Agreement
* specifies the terms and conditions for redistribution.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* C shell - process structure declarations
*/
/*
* Structure for each process the shell knows about:
* allocated and filled by pcreate.
* flushed by pflush; freeing always happens at top level
* so the interrupt level has less to worry about.
* processes are related to "friends" when in a pipeline;
* p_friends links makes a circular list of such jobs
*/
struct process {
short unsigned p_flags; /* various job status flags */
int p_pid;
int p_jobid; /* pid of job leader */
/* if a job is stopped/background p_jobid gives its pgrp */
};
/* added for status */
#define ABN_TERM 0200
/* flag values for p_flags */
#define PMAXLEN 80
/* defines for arguments to pprint */
#define NUMBER 01
#define NAME 02
#define REASON 04
#define AMPERSAND 010
#define FANCY 020
#define AREASON 0200
bool pnoprocesses; /* pchild found nothing to wait for */
short pmaxindex; /* current maximum job index */
int psigint();