File tree 3 files changed +58
-0
lines changed
3 files changed +58
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ pub mod prelude;
60
60
pub mod stream;
61
61
pub mod sync;
62
62
pub mod task;
63
+ pub mod process;
63
64
64
65
cfg_if ! {
65
66
if #[ cfg( any( feature = "unstable" , feature = "docs" ) ) ] {
Original file line number Diff line number Diff line change @@ -12,3 +12,59 @@ pub use std::process::{ExitStatus, Output};
12
12
13
13
// Re-export functions.
14
14
pub use std:: process:: { abort, exit, id} ;
15
+
16
+ use std:: io;
17
+ use std:: pin:: Pin ;
18
+ use std:: task:: Context ;
19
+ use crate :: future:: Future ;
20
+ use crate :: task:: Poll ;
21
+ use std:: ffi:: OsStr ;
22
+
23
+ struct Child {
24
+ stdin : Option < ChildStdin > ,
25
+ stdout : Option < ChildStdout > ,
26
+ stderr : Option < ChildStderr > ,
27
+ }
28
+
29
+ impl Child {
30
+ fn id ( & self ) -> u32 {
31
+ unimplemented ! ( "need to do" ) ;
32
+ }
33
+ fn kill ( & mut self ) -> io:: Result < ( ) > {
34
+ unimplemented ! ( ) ;
35
+ }
36
+ async fn output ( self ) -> io:: Result < Output > {
37
+ unimplemented ! ( ) ;
38
+ }
39
+ }
40
+
41
+ impl Future for Child {
42
+ type Output = io:: Result < ExitStatus > ;
43
+
44
+ fn poll ( self : Pin < & mut Self > , context : & mut Context < ' _ > ) -> Poll < Self :: Output > {
45
+ unimplemented ! ( ) ;
46
+ }
47
+
48
+ }
49
+
50
+ struct ChildStdin ;
51
+ struct ChildStdout ;
52
+ struct ChildStderr ;
53
+
54
+ struct Command ;
55
+
56
+ impl Command {
57
+ fn new < S : AsRef < OsStr > > ( program : S ) -> Command {
58
+ unimplemented ! ( ) ;
59
+ }
60
+ /// ```
61
+ /// let child = Command::new("ls").spawn();
62
+ /// let future = child.expect("failed to spawn child");
63
+ /// let result = future.await?;
64
+ /// assert!(!result.empty());
65
+ /// assert!(false);
66
+ /// ```
67
+ fn spawn ( & mut self ) -> io:: Result < Child > {
68
+ unimplemented ! ( ) ;
69
+ }
70
+ }
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ fn test_buffered_writer() {
47
47
} )
48
48
}
49
49
50
+ #[ ignore]
50
51
#[ test]
51
52
fn test_buffered_writer_inner_into_inner_does_not_flush ( ) {
52
53
task:: block_on ( async {
You can’t perform that action at this time.
0 commit comments