xref: /freebsd/share/man/man9/devctl_process_running.9 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
1*a329c23eSWarner Losh.\"
2*a329c23eSWarner Losh.\" Copyright (c) 2020 M Warner Losh
3*a329c23eSWarner Losh.\"
4*a329c23eSWarner Losh.\" Redistribution and use in source and binary forms, with or without
5*a329c23eSWarner Losh.\" modification, are permitted provided that the following conditions
6*a329c23eSWarner Losh.\" are met:
7*a329c23eSWarner Losh.\" 1. Redistributions of source code must retain the above copyright
8*a329c23eSWarner Losh.\"    notice, this list of conditions and the following disclaimer.
9*a329c23eSWarner Losh.\" 2. Redistributions in binary form must reproduce the above copyright
10*a329c23eSWarner Losh.\"    notice, this list of conditions and the following disclaimer in the
11*a329c23eSWarner Losh.\"    documentation and/or other materials provided with the distribution.
12*a329c23eSWarner Losh.\"
13*a329c23eSWarner Losh.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
14*a329c23eSWarner Losh.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15*a329c23eSWarner Losh.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16*a329c23eSWarner Losh.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
17*a329c23eSWarner Losh.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18*a329c23eSWarner Losh.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19*a329c23eSWarner Losh.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20*a329c23eSWarner Losh.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21*a329c23eSWarner Losh.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22*a329c23eSWarner Losh.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*a329c23eSWarner Losh.\"
24*a329c23eSWarner Losh.Dd September 22, 2020
25*a329c23eSWarner Losh.Dt DEVCTL_PROCESS_RUNNING 9
26*a329c23eSWarner Losh.Os
27*a329c23eSWarner Losh.Sh NAME
28*a329c23eSWarner Losh.Nm devctl_process_running
29*a329c23eSWarner Losh.Nd Returns true when devctl has a consumer process running
30*a329c23eSWarner Losh.Sh SYNOPSIS
31*a329c23eSWarner Losh.In sys/devctl.h
32*a329c23eSWarner Losh.Ft bool
33*a329c23eSWarner Losh.Fn devctl_process_running "void"
34*a329c23eSWarner Losh.Sh DESCRIPTION
35*a329c23eSWarner LoshThe
36*a329c23eSWarner Losh.Nm
37*a329c23eSWarner Loshcall returns
38*a329c23eSWarner Losh.Vt true
39*a329c23eSWarner Loshwhen a process has the devctl device open for
40*a329c23eSWarner Loshreading, and
41*a329c23eSWarner Losh.Vt false
42*a329c23eSWarner Loshotherwise.
43*a329c23eSWarner LoshOne can assume from this that the default
44*a329c23eSWarner Losh.Xr devd 8
45*a329c23eSWarner Loshor similar is running when
46*a329c23eSWarner Losh.Vt true
47*a329c23eSWarner Loshis returned.
48*a329c23eSWarner LoshSome subsystems will send a message and allow userland to do something
49*a329c23eSWarner Loshbefore proceeding with a default action if there's a timeout.
50*a329c23eSWarner LoshThis call allows those subsystems to do the default action right away
51*a329c23eSWarner Loshwhen no process is running.
52*a329c23eSWarner Losh.Sh SEE ALSO
53*a329c23eSWarner Losh.Xr devd 8
54*a329c23eSWarner Losh.Sh AUTHORS
55*a329c23eSWarner LoshThis manual page was written by
56*a329c23eSWarner Losh.An M. Warner Losh
57