@@ -13,8 +13,7 @@ use libc;
13
13
use mem;
14
14
use ptr;
15
15
16
- use sys:: mx_cvt;
17
- use sys:: magenta:: { Handle , launchpad_t, mx_handle_t} ;
16
+ use sys:: process:: magenta:: { Handle , launchpad_t, mx_handle_t} ;
18
17
use sys:: process:: process_common:: * ;
19
18
20
19
////////////////////////////////////////////////////////////////////////////////
@@ -53,7 +52,7 @@ impl Command {
53
52
54
53
unsafe fn do_exec ( & mut self , stdio : ChildPipes )
55
54
-> io:: Result < ( * mut launchpad_t , mx_handle_t ) > {
56
- use sys:: magenta:: * ;
55
+ use sys:: process :: magenta:: * ;
57
56
58
57
let job_handle = mxio_get_startup_handle ( mx_hnd_info ( MX_HND_TYPE_JOB , 0 ) ) ;
59
58
let envp = match * self . get_envp ( ) {
@@ -72,11 +71,9 @@ impl Command {
72
71
73
72
// Duplicate the job handle
74
73
let mut job_copy: mx_handle_t = MX_HANDLE_INVALID ;
75
- mx_cvt ( mx_handle_duplicate ( job_handle, MX_RIGHT_SAME_RIGHTS ,
76
- & mut job_copy as * mut mx_handle_t ) ) ?;
74
+ mx_cvt ( mx_handle_duplicate ( job_handle, MX_RIGHT_SAME_RIGHTS , & mut job_copy) ) ?;
77
75
// Create a launchpad
78
- mx_cvt ( launchpad_create ( job_copy, self . get_argv ( ) [ 0 ] ,
79
- & mut launchpad as * mut * mut launchpad_t ) ) ?;
76
+ mx_cvt ( launchpad_create ( job_copy, self . get_argv ( ) [ 0 ] , & mut launchpad) ) ?;
80
77
// Set the process argv
81
78
mx_cvt ( launchpad_arguments ( launchpad, self . get_argv ( ) . len ( ) as i32 - 1 ,
82
79
self . get_argv ( ) . as_ptr ( ) ) ) ?;
@@ -138,7 +135,7 @@ impl Process {
138
135
}
139
136
140
137
pub fn kill ( & mut self ) -> io:: Result < ( ) > {
141
- use sys:: magenta:: * ;
138
+ use sys:: process :: magenta:: * ;
142
139
143
140
unsafe { mx_cvt ( mx_task_kill ( self . handle . raw ( ) ) ) ?; }
144
141
@@ -147,7 +144,7 @@ impl Process {
147
144
148
145
pub fn wait ( & mut self ) -> io:: Result < ExitStatus > {
149
146
use default:: Default ;
150
- use sys:: magenta:: * ;
147
+ use sys:: process :: magenta:: * ;
151
148
152
149
let mut proc_info: mx_info_process_t = Default :: default ( ) ;
153
150
let mut actual: mx_size_t = 0 ;
@@ -171,7 +168,7 @@ impl Process {
171
168
172
169
impl Drop for Process {
173
170
fn drop ( & mut self ) {
174
- use sys:: magenta:: launchpad_destroy;
171
+ use sys:: process :: magenta:: launchpad_destroy;
175
172
unsafe { launchpad_destroy ( self . launchpad ) ; }
176
173
}
177
174
}
0 commit comments