pioctl.h revision 31594
11590Srgrimes/*
21590Srgrimes * procfs ioctl definitions.
31590Srgrimes *
41590Srgrimes * $Id: pioctl.h,v 1.1 1997/12/06 04:11:14 sef Exp $
51590Srgrimes */
61590Srgrimes
71590Srgrimes#ifndef _SYS_PIOCTL_H
81590Srgrimes# define _SYS_PIOCTL_H
91590Srgrimes
101590Srgrimes# include <sys/ioccom.h>
111590Srgrimes
121590Srgrimesstruct procfs_status {
131590Srgrimes	int	state;	/* Running, stopped, something else? */
141590Srgrimes	int	flags;	/* Any flags */
151590Srgrimes	unsigned long	events;	/* Events to stop on */
161590Srgrimes	int	why;	/* What event, if any, proc stopped on */
171590Srgrimes	unsigned long	val;	/* Any extra data */
181590Srgrimes};
191590Srgrimes
201590Srgrimes# define	PIOCBIS	_IOW('p', 1, unsigned int)	/* Set event flag */
211590Srgrimes# define	PIOCBIC	_IOW('p', 2, unsigned int)	/* Clear event flag */
221590Srgrimes# define	PIOCSFL	_IOR('p', 3, unsigned int)	/* Set flags */
231590Srgrimes			/* wait for proc to stop */
241590Srgrimes# define	PIOCWAIT	_IOR('p', 4, struct procfs_status)
251590Srgrimes# define	PIOCCONT	_IOW('p', 5, int)	/* Continue a process */
261590Srgrimes			/* Get proc status */
271590Srgrimes# define	PIOCSTATUS	_IOW('p', 6, struct procfs_status)
281590Srgrimes
291590Srgrimes# define S_EXEC	0x00000001	/* stop-on-exec */
301590Srgrimes# define	S_SIG	0x00000002	/* stop-on-signal */
311590Srgrimes# define	S_SCE	0x00000004	/* stop on syscall entry */
321590Srgrimes# define	S_SCX	0x00000008	/* stop on syscall exit */
331590Srgrimes# define	S_CORE	0x00000010	/* stop on coredump */
341590Srgrimes# define	S_EXIT	0x00000020	/* stop on exit */
3574769Smikeh
3688150Smikeh/*
3774769Smikeh * If PF_LINGER is set in procp->p_pfsflags, then the last close
381590Srgrimes * of a /proc/<pid>/mem file will nto clear out the stops and continue
3999112Sobrien * the process.
4099112Sobrien */
411590Srgrimes
421590Srgrimes# define PF_LINGER	0x01	/* Keep stops around after last close */
431590Srgrimes
441590Srgrimes#endif
451590Srgrimes