<feed xmlns='http://www.w3.org/2005/Atom'>
<title>paraslash/exec.c, branch next</title>
<subtitle>paraslash - network audio streaming tools</subtitle>
<id>https://git.tue.mpg.de/cgit/paraslash/atom?h=next</id>
<link rel='self' href='https://git.tue.mpg.de/cgit/paraslash/atom?h=next'/>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/'/>
<updated>2026-08-01T20:18:30Z</updated>
<entry>
<title>exec: Rename para_exec_cmdline_pid() to xexec().</title>
<updated>2026-08-01T20:18:30Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-07-22T17:43:18Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=542c4a5da15efc05342f99e092e6a2e2b831c126'/>
<id>urn:sha1:542c4a5da15efc05342f99e092e6a2e2b831c126</id>
<content type='text'>
This is shorter and conveys enough information. Rename the static para_exec()
as well.
</content>
</entry>
<entry>
<title>exec: Detect and report exec errors.</title>
<updated>2026-07-26T21:54:39Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-04-20T17:29:32Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=3f661d865d5a29ee37f7984d7689e1d91902cac3'/>
<id>urn:sha1:3f661d865d5a29ee37f7984d7689e1d91902cac3</id>
<content type='text'>
In para_exec(), the parent does not detect errors that occur in the child
after the call to fork() succeeded. This includes the common error case
where the child's call to execvp() fails due to a path lookup error.

It is not difficult to implement error detection by introducing an additional
"control" pipe whose file descriptors are opened with O_CLOEXEC. If the
child's call to execvp() succeeds, the OS closes the descriptor and the
function does not return, Otherwise the descriptor remains open and execvp()
returns with errno set to indicate the error. In this case the child writes a
four byte representation of errno to the control pipe and exits. The parent
reads from the other end of the pipe. If the read returns zero, execvp()
succeeded. Otherwise, the parent has an error code to work with.
</content>
</entry>
<entry>
<title>exec: Improve documentation of para_exec_cmdline_pid().</title>
<updated>2026-07-15T14:22:41Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-07-12T19:53:24Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=14d3b8f303fe7ff8ded784161fb14ebf2d840e62'/>
<id>urn:sha1:14d3b8f303fe7ff8ded784161fb14ebf2d840e62</id>
<content type='text'>
Drop some implementation details and describe the semantics of the pid
pointer in the error case.
</content>
</entry>
<entry>
<title>exec: Check return value of dup2().</title>
<updated>2026-07-14T17:53:19Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-07-06T21:42:49Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=1128acabb6597e685c899d89a0a67b86e082d7f5'/>
<id>urn:sha1:1128acabb6597e685c899d89a0a67b86e082d7f5</id>
<content type='text'>
Currently para_exec() ignores all errors from dup2(). Introduce xdup2()
to teach para_exec() to abort on fatal errors and to retry on EINTR.
</content>
</entry>
<entry>
<title>exec: Invalidate pid if no process was created.</title>
<updated>2026-07-14T17:42:21Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-07-06T21:14:00Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=7652b0d15f11ca3691241fffb9e804cd7dd97baa'/>
<id>urn:sha1:7652b0d15f11ca3691241fffb9e804cd7dd97baa</id>
<content type='text'>
If para_exec() fails, it may return with or without writing through the pid
pointer. It's safer to initialize the pid at the beginning of the function
so that pid == 0 iff no process was created.
</content>
</entry>
<entry>
<title>exec: Drop error message on failure.</title>
<updated>2026-05-26T11:48:47Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-05-24T22:32:31Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=a6a0ae61da3bd565e3c378e5aa1a53c46b48dada'/>
<id>urn:sha1:a6a0ae61da3bd565e3c378e5aa1a53c46b48dada</id>
<content type='text'>
We return the error code, so the caller should act as it sees fit.
</content>
</entry>
<entry>
<title>Switch to SPDX identifiers.</title>
<updated>2026-03-17T22:45:43Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-03-15T14:57:29Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=ea0cecf96e08c489fdcc94d046019f4ce46f58e2'/>
<id>urn:sha1:ea0cecf96e08c489fdcc94d046019f4ce46f58e2</id>
<content type='text'>
Generated with

	sed -i 's|Copyright.*Andre Noll.*|SPDX-License-Identifier: GPL-2.0 */|g' *.c *.h

followed by manually tweaking the result a bit. No license change intended.
</content>
</entry>
<entry>
<title>Include regex.h from para.h.</title>
<updated>2025-05-19T17:35:58Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2025-05-18T20:05:45Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=67388cd4fae0cfd1674aada937f4f4d2faeeee1f'/>
<id>urn:sha1:67388cd4fae0cfd1674aada937f4f4d2faeeee1f</id>
<content type='text'>
Every .c file includes it anyway.
</content>
</entry>
<entry>
<title>exec: Improve documentation.</title>
<updated>2025-01-02T18:35:54Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2025-01-01T20:21:08Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=ca4cb7171c4a391d22af105eb2f9a750e64ac8ea'/>
<id>urn:sha1:ca4cb7171c4a391d22af105eb2f9a750e64ac8ea</id>
<content type='text'>
Clarify the documentation of the public para_exec_cmdline_pid()
and dedox the static para_exec().
</content>
</entry>
<entry>
<title>gui: Kill also child processes of external commands.</title>
<updated>2024-12-25T20:08:32Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2024-08-19T19:41:23Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=0deae8543d24cda974b0b7bbbb5be2a924ceef21'/>
<id>urn:sha1:0deae8543d24cda974b0b7bbbb5be2a924ceef21</id>
<content type='text'>
When a command is executed as a display command from para_gui, and
the command is interrupted from within para_gui by pressing any key,
para_gui only kills the spawned process but leaves alone its child
processes.

Address this problem by putting the spawned process into a separate
process group so that we can easily kill all processes of the group
by passing the negated PID of the child to kill(2).

In theory, the change in exec.c also affects para_mixer, which executes
para_client and para_audioc. However, para_mixer never kills any of
its child processes.
</content>
</entry>
</feed>
