@@ -16,12 +16,20 @@ pub trait CommandExt {
1616 /// `setuid` call in the child process. Failure in the `setuid`
1717 /// call will cause the spawn to fail.
1818 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
19- fn uid ( & mut self , id : u32 ) -> & mut process:: Command ;
19+ fn uid (
20+ & mut self ,
21+ #[ cfg( not( target_os = "vxworks" ) ) ] id : u32 ,
22+ #[ cfg( target_os = "vxworks" ) ] id : u16 ,
23+ ) -> & mut process:: Command ;
2024
2125 /// Similar to `uid`, but sets the group ID of the child process. This has
2226 /// the same semantics as the `uid` field.
2327 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
24- fn gid ( & mut self , id : u32 ) -> & mut process:: Command ;
28+ fn gid (
29+ & mut self ,
30+ #[ cfg( not( target_os = "vxworks" ) ) ] id : u32 ,
31+ #[ cfg( target_os = "vxworks" ) ] id : u16 ,
32+ ) -> & mut process:: Command ;
2533
2634 /// Schedules a closure to be run just before the `exec` function is
2735 /// invoked.
@@ -115,12 +123,20 @@ pub trait CommandExt {
115123
116124#[ stable( feature = "rust1" , since = "1.0.0" ) ]
117125impl CommandExt for process:: Command {
118- fn uid ( & mut self , id : u32 ) -> & mut process:: Command {
126+ fn uid (
127+ & mut self ,
128+ #[ cfg( not( target_os = "vxworks" ) ) ] id : u32 ,
129+ #[ cfg( target_os = "vxworks" ) ] id : u16 ,
130+ ) -> & mut process:: Command {
119131 self . as_inner_mut ( ) . uid ( id) ;
120132 self
121133 }
122134
123- fn gid ( & mut self , id : u32 ) -> & mut process:: Command {
135+ fn gid (
136+ & mut self ,
137+ #[ cfg( not( target_os = "vxworks" ) ) ] id : u32 ,
138+ #[ cfg( target_os = "vxworks" ) ] id : u16 ,
139+ ) -> & mut process:: Command {
124140 self . as_inner_mut ( ) . gid ( id) ;
125141 self
126142 }
0 commit comments