任务单 #39626

Add subprocess API

开放日期: 2019-09-30 20:36 最后更新: 2020-03-22 20:55

报告人:
属主:
状态:
开启 [Owner assigned]
组件:
(无)
里程碑:
(无)
优先:
5 - Medium
严重性:
5 - Medium
处理结果:
文件:

Details

Add subprocess API

任务单历史 (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
  • 属主 Update from (无) to miyakawataku
2020-03-21 14:34 Updated by: miyakawataku
  • 属主 Update from miyakawataku to (无)
2020-03-22 13:20 Updated by: miyakawataku
  • 属主 Update from (无) to miyakawataku
2020-03-22 17:28 Updated by: miyakawataku
评论
: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-04-02 20:54 Updated by: miyakawataku)
2020-03-22 20:55 Updated by: miyakawataku
评论

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

编辑

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