BSD 4_3 release
[unix-history] / usr / src / usr.lib / libU77 / kill_.c
CommitLineData
443011a0 1/*
161423a6
RE
2 * Copyright (c) 1980 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
443011a0 5 *
95f51977 6 * @(#)kill_.c 5.1 6/7/85
161423a6
RE
7 */
8
9/*
443011a0
DW
10 * send a signal to a process
11 *
12 * calling sequence:
13 * ierror = kill(pid, signum)
14 * where:
15 * pid must be the process id of one of the user's processes
16 * signum must be a valid signal number (see signal(2))
17 * ierror will be 0 if successful; an error code otherwise.
18 */
19
20#include "../libI77/f_errno.h"
21
22long kill_(pid, signum)
23long *pid, *signum;
24{
25 if (*pid < 0 || *pid > 32767L || *signum < 1 || *signum > 16)
26 return((long)(errno=F_ERARG));
27 if (kill((int)*pid, (int)*signum) != 0)
28 return((long)errno);
29 return(0L);
30}