#define PM_SIG_SET m2_sigset /* sigset_t */
#define PM_SIG_CTX m2_p1 /* struct sigcontext * */
-/* Field names for the getppid(2) call. */
-#define PM_GETPID_PARENT m2_i1 /* pid_t */
-
/* Field names for the setsid(2) call. */
#define PM_GETSID_PID m1_i1 /* pid_t */
} mess_pm_lc_getgid;
_ASSERT_MSG_SIZE(mess_pm_lc_getgid);
+typedef struct {
+ pid_t parent_pid;
+
+ uint8_t padding[52];
+} mess_pm_lc_getpid;
+_ASSERT_MSG_SIZE(mess_pm_lc_getpid);
+
typedef struct {
uid_t euid;
mess_pm_lexec_exec_new m_pm_lexec_exec_new;
mess_pm_lc_getgid m_pm_lc_getgid;
+ mess_pm_lc_getpid m_pm_lc_getpid;
mess_pm_lc_getuid m_pm_lc_getuid;
mess_pm_lc_ptrace m_pm_lc_ptrace;
mess_pm_lc_time m_pm_lc_time;
* are not always successful and Minix returns the reserved value
* (pid_t) -1 when there is an error.
*/
- if (_syscall(PM_PROC_NR, PM_GETPID, &m) < 0) return ( (pid_t) -1);
- return( (pid_t) m.PM_GETPID_PARENT);
+ if (_syscall(PM_PROC_NR, PM_GETPID, &m) < 0) return(-1);
+ return(m.m_pm_lc_getpid.parent_pid);
}
case PM_GETPID:
r = mproc[who_p].mp_pid;
- rmp->mp_reply.PM_GETPID_PARENT = mproc[rmp->mp_parent].mp_pid;
+ rmp->mp_reply.m_pm_lc_getpid.parent_pid = mproc[rmp->mp_parent].mp_pid;
break;
case PM_GETPGRP: