Ticket #39626

Add subprocess API

Open Date: 2019-09-30 20:36 Last Update: 2020-03-22 20:55

Reporter:
Owner:
Status:
Open [Owner assigned]
Component:
(None)
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
None
File:
None

Details

Add subprocess API

Ticket History (3/6 Histories)

2019-09-30 20:36 Updated by: miyakawataku
  • New Ticket "Add subprocess API" created
2020-03-20 22:11 Updated by: miyakawataku
  • Owner Update from (None) to miyakawataku
2020-03-21 14:34 Updated by: miyakawataku
  • Owner Update from miyakawataku to (None)
2020-03-22 13:20 Updated by: miyakawataku
  • Owner Update from (None) to miyakawataku
2020-03-22 17:28 Updated by: miyakawataku
Comment
:SUBPROCESS.require_from('xxx/')

foo{
  :Sp = SUBPROCESS.start('ls' ['-l' '/var']){(:C)
    C.stdout_to_input
    C.stderr_to_file('/var/log/xxx.log')
    C.stdin_from_empty
  }
  :Stdout_in = Sp.stdout
  :Stdin_out = Sp.stdin
  ...
  :Exit_status = Sp.wait
  or
  Sp.wait(10){(:C)
    C.on_success{(:Status) ... }
    C.on_timeout{ ... }
  }
}
(Edited, 2020-03-29 18:58 Updated by: miyakawataku)
2020-03-22 20:55 Updated by: miyakawataku
Comment

Subprocess_conf:

  • C.stdout_to_pipe
  • C.stdout_to_file(Path)
  • C.stdout_inherit
  • C.stderr_to_pipe
  • C.stderr_to_file(Path)
  • C.stderr_inherit
  • C.stdin_from_pipe
  • C.stdin_from_file(Path)
  • C.stdin_inherit
  • C.directory(Path)
  • C.setenv(Env_name Val)
  • C.unsetenv(Env_name Val)
  • C.on_success($success_cont)
  • C.on_error($error_cont)
(Edited, 2020-03-29 19:00 Updated by: miyakawataku)

Attachment File List

No attachments

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login