1 #ifndef __VFS_FPROC_H__
2 #define __VFS_FPROC_H__
4 #include <sys/select.h>
5 #include <minix/safecopies.h>
7 /* This is the per-process information. A slot is reserved for each potential
8 * process. Thus NR_PROCS must be the same as in the kernel. It is not
9 * possible or even necessary to tell when a slot is free here.
14 mode_t fp_umask
; /* mask set by umask system call */
16 struct vnode
*fp_wd
; /* working directory; NULL during reboot */
17 struct vnode
*fp_rd
; /* root directory; NULL during reboot */
19 struct filp
*fp_filp
[OPEN_MAX
];/* the file descriptor table */
21 fd_set fp_filp_inuse
; /* which fd's are in use? */
22 uid_t fp_realuid
; /* real user id */
23 uid_t fp_effuid
; /* effective user id */
24 gid_t fp_realgid
; /* real group id */
25 gid_t fp_effgid
; /* effective group id */
26 int fp_ngroups
; /* number of supplemental groups */
27 gid_t fp_sgroups
[NGROUPS_MAX
];/* supplemental groups */
28 dev_t fp_tty
; /* major/minor of controlling tty */
29 int fp_fd
; /* place to save fd if rd/wr can't finish */
30 char *fp_buffer
; /* place to save buffer if rd/wr can't finish*/
31 int fp_nbytes
; /* place to save bytes if rd/wr can't finish */
32 int fp_cum_io_partial
; /* partial byte count if rd/wr can't finish */
33 int fp_revived
; /* set to indicate process being revived */
34 endpoint_t fp_task
; /* which task is proc suspended on */
35 int fp_blocked_on
; /* what is it blocked on */
37 endpoint_t fp_ioproc
; /* proc no. in suspended-on i/o message */
38 cp_grant_id_t fp_grant
; /* revoke this grant on unsuspend if > -1 */
40 char fp_sesldr
; /* true if proc is a session leader */
41 char fp_execced
; /* true if proc has exec()ced after fork */
42 pid_t fp_pid
; /* process id */
44 fd_set fp_cloexec_set
; /* bit map for POSIX Table 6-2 FD_CLOEXEC */
45 endpoint_t fp_endpoint
; /* kernel endpoint number of this process */
50 #define SUSP_REOPEN 1 /* Process is suspended until the reopens are
51 * completed (after the restart of a driver).
55 #define NOT_REVIVING 0xC0FFEEE /* process is not being revived */
56 #define REVIVING 0xDEEAD /* process is being revived from suspension */
57 #define PID_FREE 0 /* process slot free */
59 #endif /* __VFS_FPROC_H__ */