<feed xmlns='http://www.w3.org/2005/Atom'>
<title>paraslash/stdin.c, branch master</title>
<subtitle>paraslash - network audio streaming tools</subtitle>
<id>https://git.tue.mpg.de/cgit/paraslash/atom?h=master</id>
<link rel='self' href='https://git.tue.mpg.de/cgit/paraslash/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/'/>
<updated>2026-03-17T22:45:43Z</updated>
<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>Fix some doxygen comments related to stdin and stdout.</title>
<updated>2026-02-25T18:26:02Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-02-18T18:12:34Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=769f4fcfb7e48a277f01195acb07bd75d0a410a0'/>
<id>urn:sha1:769f4fcfb7e48a277f01195acb07bd75d0a410a0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix two stdin/stdout related memory leaks.</title>
<updated>2025-11-17T16:49:38Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2025-11-16T20:45:33Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=309276d5d8f7a489a5c4701e1c8c1bf08ac81d4f'/>
<id>urn:sha1:309276d5d8f7a489a5c4701e1c8c1bf08ac81d4f</id>
<content type='text'>
The moderately recent commit which revamped the stdin/stdout API missed to
patch the client code to call the cleanup functions {stdin,stdout}_free()
introduced by that commit.

Also, both {stdin,stdout}.c missed to remove the buffer tree node in certain
cases. The additional btr_remove_node() calls fix this, and they don't hurt
since this function is idempotent.

Fixes: c30b3cf7b9eb76f6b0a6259a4f630017de804608
</content>
</entry>
<entry>
<title>Revamp the stdin/stdout API.</title>
<updated>2025-08-27T17:16:54Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2025-07-09T15:20:42Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=c30b3cf7b9eb76f6b0a6259a4f630017de804608'/>
<id>urn:sha1:c30b3cf7b9eb76f6b0a6259a4f630017de804608</id>
<content type='text'>
With the current API it is impossible to free the memory that was allocated
by stdin_task_register() after schedule() returns. This commit replaces the
APIs defined in stdin.h and stdout.h to remove the memory leaks which are
inevitable with the old API. We also make struct stdin_task and stdout_task
opaque because the API users (client.c, filter.c, recv.c and write.c) should
not be able to manipulate the fields of these structures directly.

The new stdout API differs from the new stdin API only in that stdout_new()
needs an additional argument to let the caller pass in a pointer to the
parent buffer tree node. Other than that, the APIs are symmetric.

Use the opportunity to do the non-blocking dance in std{in,out}_new()
and std{in,out}_free() rather than in the post-monitor functions. This
way we may get rid of the silly -&gt;must_set_nonblock_flag boolean of struct
std{in,out}_task.
</content>
</entry>
<entry>
<title>stdin: Only read from stdin if fd 0 is ready.</title>
<updated>2025-07-12T19:45:44Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2025-07-09T15:23:52Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=f680355be739ed4e98ed52d1fc44b3805861d004'/>
<id>urn:sha1:f680355be739ed4e98ed52d1fc44b3805861d004</id>
<content type='text'>
If fd 0 refers to a tty, this file descriptor is blocking. So make sure we
don't read unless we know that the read operation won't block.
</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>Rename -&gt;{pre,post}_select methods to -&gt;{pre,post}_monitor.</title>
<updated>2022-08-25T13:37:26Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2021-10-10T16:10:09Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=e3a7e12639c34fd86d48a072beb48add8c498d09'/>
<id>urn:sha1:e3a7e12639c34fd86d48a072beb48add8c498d09</id>
<content type='text'>
The word "monitor" is neutral and continues to be correct after the
switch from select(2) to poll(2).

Pure rename, nothing to see here.
</content>
</entry>
<entry>
<title>stdin/stdout: Streamline documentation of {pre,post}_select().</title>
<updated>2022-08-25T13:37:26Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2021-10-07T19:22:59Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=a62a0bb8fab75f42a3ae165d85e01fb0b98de056'/>
<id>urn:sha1:a62a0bb8fab75f42a3ae165d85e01fb0b98de056</id>
<content type='text'>
Don't state the obvious and avoid talking about fd sets.
</content>
</entry>
<entry>
<title>Hide implementation of para_fd_set().</title>
<updated>2022-08-25T13:37:26Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2021-10-03T19:52:02Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=bb899fb1a0c279a2890ff30d11bf7aec50fb92ed'/>
<id>urn:sha1:bb899fb1a0c279a2890ff30d11bf7aec50fb92ed</id>
<content type='text'>
This preparatory patch for replacing select() renames para_fd_set()
to sched_fd_set(), moves it to sched.c and makes it static. All
users are modified to call either of the two new public functions
sched_monitor_{read,write}fd() which take a pointer to struct sched
rather than an fd set pointer.
</content>
</entry>
<entry>
<title>fd: Drop fd_set parameter from read_nonblock() and friends.</title>
<updated>2022-08-25T13:37:26Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2021-09-30T19:46:58Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=4ddaef74ff8f605a31c499d77fcaaffa7a3708c0'/>
<id>urn:sha1:4ddaef74ff8f605a31c499d77fcaaffa7a3708c0</id>
<content type='text'>
This parameter is not necessary because its only purpose is to
avoid the readv(2) system call in case it would likely return EAGAIN
because we just called select(2) which reported that there is no data
to read. Since the parameter is an obstacle for the conversion of
the code base from select(2) to poll(2), get rid of it for the time
being. If needed we can add back an equivalent optimization which
checks for POLLIN after the conversion.
</content>
</entry>
</feed>
