<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-petitboot/lib/process, branch v1.3.2</title>
<subtitle>Blackbird™ petitboot sources</subtitle>
<id>https://git.raptorcs.com/git/talos-petitboot/atom?h=v1.3.2</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-petitboot/atom?h=v1.3.2'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-petitboot/'/>
<updated>2014-04-03T06:25:48+00:00</updated>
<entry>
<title>lib/process: Add debug on process kill</title>
<updated>2014-04-03T06:25:48+00:00</updated>
<author>
<name>Jeremy Kerr</name>
<email>jk@ozlabs.org</email>
</author>
<published>2014-04-03T06:25:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-petitboot/commit/?id=5f206b3d7960b79a4c85067132caa7e7a29dfc59'/>
<id>urn:sha1:5f206b3d7960b79a4c85067132caa7e7a29dfc59</id>
<content type='text'>
Signed-off-by: Jeremy Kerr &lt;jk@ozlabs.org&gt;
</content>
</entry>
<entry>
<title>lib/process: Don't abort stdout reads on EINTR</title>
<updated>2014-02-20T02:11:52+00:00</updated>
<author>
<name>Jeremy Kerr</name>
<email>jk@ozlabs.org</email>
</author>
<published>2014-02-20T01:22:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-petitboot/commit/?id=ffb84fc1bf1d138d1ac1bb8ece0b7d625f288d97'/>
<id>urn:sha1:ffb84fc1bf1d138d1ac1bb8ece0b7d625f288d97</id>
<content type='text'>
If our read() of the process stdout pipe fails with EINTR (eg, if we
receive a SIGCHLD because the process exited), then
process_read_stdout_once will return a non-zero exit code, and we'll
abort any further stdout collection.

Instead, we should check for EINTR, and allow the reads to continue.

This change normalises the return value from process_read_stdout_once to
return positive on success, negative on failure, and zero on competion.
We use a positive return value for the non-error EINTR case.

Also, add a pb_log if the read fails for non-EINTR reasons.

Signed-off-by: Jeremy Kerr &lt;jk@ozlabs.org&gt;
</content>
</entry>
<entry>
<title>lib/process: Add helper for check process clean exit</title>
<updated>2014-01-21T05:36:01+00:00</updated>
<author>
<name>Jeremy Kerr</name>
<email>jk@ozlabs.org</email>
</author>
<published>2014-01-21T02:00:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-petitboot/commit/?id=2ad0e66f61e8f8488cff208f8bb7f5127ec9f813'/>
<id>urn:sha1:2ad0e66f61e8f8488cff208f8bb7f5127ec9f813</id>
<content type='text'>
We have a few incorrect checks for the exit status of a process; this
change adds a helper with the correct WIFEXITED &amp;&amp; WEXITSTATUS==0 logic.

Signed-off-by: Jeremy Kerr &lt;jk@ozlabs.org&gt;
</content>
</entry>
<entry>
<title>lib/process: Add add_stderr flag to process module</title>
<updated>2014-01-14T07:55:21+00:00</updated>
<author>
<name>Jeremy Kerr</name>
<email>jk@ozlabs.org</email>
</author>
<published>2014-01-14T07:44:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-petitboot/commit/?id=33527e065d9506e05f61c020a473544123c0601b'/>
<id>urn:sha1:33527e065d9506e05f61c020a473544123c0601b</id>
<content type='text'>
For some process execution functions, we'd like to capture stderr as
well as stdout. Currently, we unconditionally redirect subprocess stderr
to the petitboot log file.

This change adds an add_stderr flag to struct process, which indicates
to the process library that we want stderr as well as stdout. If this is
specified, the subprocess' stderr is captured to stdout_buf.

Signed-off-by: Jeremy Kerr &lt;jk@ozlabs.org&gt;
</content>
</entry>
<entry>
<title>lib/process: handle EINTR from waitpid</title>
<updated>2013-08-20T02:30:57+00:00</updated>
<author>
<name>Jeremy Kerr</name>
<email>jk@ozlabs.org</email>
</author>
<published>2013-08-20T02:30:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-petitboot/commit/?id=fb0fdcc59d7b0f2ed97f1894b25e4424131970f6'/>
<id>urn:sha1:fb0fdcc59d7b0f2ed97f1894b25e4424131970f6</id>
<content type='text'>
Signed-off-by: Jeremy Kerr &lt;jk@ozlabs.org&gt;
</content>
</entry>
<entry>
<title>lib/process: Add dry_run argument to process_init</title>
<updated>2013-08-20T02:14:44+00:00</updated>
<author>
<name>Jeremy Kerr</name>
<email>jk@ozlabs.org</email>
</author>
<published>2013-08-20T02:14:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-petitboot/commit/?id=815df381d55e09fd291145ef2b86729c12583366'/>
<id>urn:sha1:815df381d55e09fd291145ef2b86729c12583366</id>
<content type='text'>
Implement dry-run behaviour on the discover server by passing a bool to
process_init. UIs don't need to support dry runs.

Signed-off-by: Jeremy Kerr &lt;jk@ozlabs.org&gt;
</content>
</entry>
<entry>
<title>lib/process: Add process helpers</title>
<updated>2013-08-19T05:27:59+00:00</updated>
<author>
<name>Jeremy Kerr</name>
<email>jk@ozlabs.org</email>
</author>
<published>2013-08-12T07:57:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-petitboot/commit/?id=e52a8c61a640ab4fce0b4caaa796ae3e1c4ff8a3'/>
<id>urn:sha1:e52a8c61a640ab4fce0b4caaa796ae3e1c4ff8a3</id>
<content type='text'>
We've grown-out of pb_run_cmd a little, as we have a number of different
process types:

   boot():
    - kexec: short-running process, run synchronously
    - boot hooks: short-running, run sync, need exit code &amp; stdout

   network init:
    - interface configuration: short running, run sync
    - udhcp processes are long running, we may want completion, but
      doesn't block other actions

   downloads:
    - potentially long-running, block parse progress

   config nvram:
    - read: short running, can block, need stdout
    - write: short running, can block

We'd like to introduce proper asynchronous processes, to allow config &amp;
boot-option downloads without blocking the discover server.

This change introduces a new type for processes, 'struct process'. These
structures are created with process_create, and run with
process_run_sync or process_run_async. The latter reports completion
through a callback member of struct process.

Signed-off-by: Jeremy Kerr &lt;jk@ozlabs.org&gt;
</content>
</entry>
</feed>
