Message type for PM_EXIT

Change-Id: Ie78768d95358a701268129587074a48493cf5bbc
This commit is contained in:
Lionel Sambuc 2014-05-13 17:33:27 +02:00
parent f88b0001ba
commit 6495d409d6
4 changed files with 10 additions and 5 deletions

View file

@ -61,9 +61,6 @@
#define NR_PM_CALLS 48 /* highest number from base plus one */
/* Field names for the exit(2) call. */
#define PM_EXIT_STATUS m1_i1 /* int */
/* Field names for the kill(2), srv_kill(2), and sigaction(2) calls. */
#define PM_SIG_PID m1_i1 /* pid_t */
#define PM_SIG_NR m1_i2 /* int */

View file

@ -156,6 +156,13 @@ typedef struct {
} mess_lc_pm_exec;
_ASSERT_MSG_SIZE(mess_lc_pm_exec);
typedef struct {
int status;
uint8_t padding[52];
} mess_lc_pm_exit;
_ASSERT_MSG_SIZE(mess_lc_pm_exit);
typedef struct {
pid_t pid;
@ -1076,6 +1083,7 @@ typedef struct {
mess_fs_vfs_readwrite m_fs_vfs_readwrite;
mess_lc_pm_exec m_lc_pm_exec;
mess_lc_pm_exit m_lc_pm_exit;
mess_lc_pm_getsid m_lc_pm_getsid;
mess_lc_pm_groups m_lc_pm_groups;
mess_lc_pm_itimer m_lc_pm_itimer;

View file

@ -16,7 +16,7 @@ int status;
message m;
memset(&m, 0, sizeof(m));
m.PM_EXIT_STATUS = status;
m.m_lc_pm_exit.status = status;
_syscall(PM_PROC_NR, PM_EXIT, &m);
/* If exiting nicely through PM fails for some reason, try to

View file

@ -241,7 +241,7 @@ int do_exit()
sys_kill(mp->mp_endpoint, SIGKILL);
}
else {
exit_proc(mp, m_in.PM_EXIT_STATUS, FALSE /*dump_core*/);
exit_proc(mp, m_in.m_lc_pm_exit.status, FALSE /*dump_core*/);
}
return(SUSPEND); /* can't communicate from beyond the grave */
}