/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1990-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* Glenn Fowler
* AT&T Research
*
* if co==0 then kill all coshell jobs with sig
* elif cj==0 then kill co jobs with sig
* else kill cj with sig
*
* if sig==0 then cause all CO_SERVICE jobs to fail
*/
#include "colib.h"
/*
* kill job cj in shell co with signal sig
*/
static int
{
int n;
return 0;
{
co->svc_running--;
else
return 0;
}
{
}
return n;
}
/*
* kill cj (or all jobs if cj==0) in shell co with sig
*/
static int
{
int n;
{
}
if (cj)
n = 0;
return n;
}
int
{
int any;
int n;
if (cj)
{
if (!co)
return -1;
any = 0;
}
else if (co)
any = 0;
return -1;
else
any = 1;
errormsg(state.lib, 2, "coshell %d kill co=%d cj=%d sig=%d", co->index, co ? co->pid : 0, cj ? cj->pid : 0, sig);
switch (sig)
{
case SIGINT:
break;
case SIGTSTP:
break;
#endif
}
n = 0;
do
{
return n;
}