pioctl.h revision 31691
1/*
2 * procfs ioctl definitions.
3 *
4 * $Id: pioctl.h,v 1.3 1997/12/08 22:09:39 sef Exp $
5 */
6
7#ifndef _SYS_PIOCTL_H
8# define _SYS_PIOCTL_H
9
10# include <sys/ioccom.h>
11
12struct procfs_status {
13	int	state;	/* Running, stopped, something else? */
14	int	flags;	/* Any flags */
15	unsigned long	events;	/* Events to stop on */
16	int	why;	/* What event, if any, proc stopped on */
17	unsigned long	val;	/* Any extra data */
18};
19
20# define	PIOCBIS	_IO('p', 1)	/* Set event flag */
21# define	PIOCBIC	_IO('p', 2)	/* Clear event flag */
22# define	PIOCSFL	_IO('p', 3)	/* Set flags */
23			/* wait for proc to stop */
24# define	PIOCWAIT	_IOR('p', 4, struct procfs_status)
25# define	PIOCCONT	_IO('p', 5)	/* Continue a process */
26			/* Get proc status */
27# define	PIOCSTATUS	_IOR('p', 6, struct procfs_status)
28# define	PIOCGFL	_IOR('p', 7, unsigned int)	/* Get flags */
29
30# define S_EXEC	0x00000001	/* stop-on-exec */
31# define	S_SIG	0x00000002	/* stop-on-signal */
32# define	S_SCE	0x00000004	/* stop on syscall entry */
33# define	S_SCX	0x00000008	/* stop on syscall exit */
34# define	S_CORE	0x00000010	/* stop on coredump */
35# define	S_EXIT	0x00000020	/* stop on exit */
36
37/*
38 * If PF_LINGER is set in procp->p_pfsflags, then the last close
39 * of a /proc/<pid>/mem file will nto clear out the stops and continue
40 * the process.
41 */
42
43# define PF_LINGER	0x01	/* Keep stops around after last close */
44
45#endif
46