contrib/chg/procutil.h
author Pierre-Yves David <pierre-yves.david@octobus.net>
Fri, 16 Jul 2021 17:03:39 +0200
changeset 47897 4f0ebf83e4dc
parent 31941 ac5527021097
permissions -rw-r--r--
dirstatemap: conclude `reset_state` with logic using the new __init__ Now the DirstateItem can deal with most of the logic related to its initialization, our goal is to migrate the function to a more "unified" way were minimal processing is done early before more generic code gets into play. Nobody is calling this code yet, but this is about to change. Differential Revision: https://phab.mercurial-scm.org/D11322
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
30693
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
     1
/*
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
     2
 * Utilities about process handling - signal and subprocess (ex. pager)
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
     3
 *
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
     4
 * Copyright (c) 2011 Yuya Nishihara <yuya@tcha.org>
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
     5
 *
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
     6
 * This software may be used and distributed according to the terms of the
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
     7
 * GNU General Public License version 2 or any later version.
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
     8
 */
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
     9
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
    10
#ifndef PROCUTIL_H_
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
    11
#define PROCUTIL_H_
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
    12
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
    13
#include <unistd.h>
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
    14
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
    15
void restoresignalhandler(void);
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
    16
void setupsignalhandler(pid_t pid, pid_t pgid);
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
    17
31941
ac5527021097 chg: respect environment variables for pager
Jun Wu <quark@fb.com>
parents: 30693
diff changeset
    18
pid_t setuppager(const char *pagercmd, const char *envp[]);
30693
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
    19
void waitpager(void);
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
    20
baee0f47b533 chg: add procutil.h
Jun Wu <quark@fb.com>
parents:
diff changeset
    21
#endif /* PROCUTIL_H_ */