~ps10gel/ubuntu/xenial/trafficserver/6.2.0

« back to all changes in this revision

Viewing changes to lib/ts/ink_killall.h

  • Committer: Bazaar Package Importer
  • Author(s): Arno Toell
  • Date: 2011-01-13 11:49:18 UTC
  • Revision ID: james.westby@ubuntu.com-20110113114918-vu422h8dknrgkj15
Tags: upstream-2.1.5-unstable
ImportĀ upstreamĀ versionĀ 2.1.5-unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/** @file
 
2
 
 
3
  A brief file description
 
4
 
 
5
  @section license License
 
6
 
 
7
  Licensed to the Apache Software Foundation (ASF) under one
 
8
  or more contributor license agreements.  See the NOTICE file
 
9
  distributed with this work for additional information
 
10
  regarding copyright ownership.  The ASF licenses this file
 
11
  to you under the Apache License, Version 2.0 (the
 
12
  "License"); you may not use this file except in compliance
 
13
  with the License.  You may obtain a copy of the License at
 
14
 
 
15
      http://www.apache.org/licenses/LICENSE-2.0
 
16
 
 
17
  Unless required by applicable law or agreed to in writing, software
 
18
  distributed under the License is distributed on an "AS IS" BASIS,
 
19
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
20
  See the License for the specific language governing permissions and
 
21
  limitations under the License.
 
22
 */
 
23
 
 
24
/*-------------------------------------------------------------------------
 
25
  -------------------------------------------------------------------------*/
 
26
 
 
27
 
 
28
#ifndef _INK_KILLALL_H_
 
29
#define _INK_KILLALL_H_
 
30
 
 
31
#include "ink_config.h"
 
32
 
 
33
#if defined(linux)
 
34
 
 
35
/*-------------------------------------------------------------------------
 
36
   ink_killall
 
37
   - Sends signal 'sig' to all processes with the name 'pname'
 
38
   - Returns: -1 error
 
39
               0 okay
 
40
  -------------------------------------------------------------------------*/
 
41
int ink_killall(const char *pname, int sig);
 
42
 
 
43
/*-------------------------------------------------------------------------
 
44
   ink_killall_get_pidv_xmalloc
 
45
   - Get all pid's named 'pname' and stores into xmalloc'd
 
46
     pid_t array, 'pidv'
 
47
   - Returns: -1 error (pidv: set to NULL; pidvcnt: set to 0)
 
48
               0 okay (pidv: xmalloc'd pid vector; pidvcnt: number of pid's;
 
49
                       if pidvcnt is set to 0, then pidv will be set to NULL)
 
50
  -------------------------------------------------------------------------*/
 
51
int ink_killall_get_pidv_xmalloc(const char *pname, pid_t ** pidv, int *pidvcnt);
 
52
 
 
53
/*-------------------------------------------------------------------------
 
54
   ink_killall_kill_pidv
 
55
   - Kills all pid's in 'pidv' with signal 'sig'
 
56
   - Returns: -1 error
 
57
               0 okay
 
58
  -------------------------------------------------------------------------*/
 
59
int ink_killall_kill_pidv(pid_t * pidv, int pidvcnt, int sig);
 
60
 
 
61
#endif
 
62
 
 
63
#endif