summaryrefslogtreecommitdiff
path: root/stdin.h (follow)
Commit message (Collapse)AuthorAge
* Switch to SPDX identifiers.Andre Noll2026-03-17
| | | | | | | | 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.
* Revamp the stdin/stdout API.Andre Noll2025-08-27
| | | | | | | | | | | | | | | | | | 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 ->must_set_nonblock_flag boolean of struct std{in,out}_task.
* Shorten copyright notice.Andre Noll2017-09-22
| | | | | | | | | | | | | | | | | | | | | The GPLv2 line does not add any additional information, so drop it. This leaves a single line of legalese text for most files, which is about the amount of screen real estate it deserves. This patch was created with the following script (plus some manual fixups): awk '{ if (NR <= 5) { gs = gensub(/.*Copyright.* ([0-9]+).*Andre Noll.*/, "\\1", "g") if (gs != $0) year = gs next } if (NR == 6 && year != "") printf("/* Copyright (C) %s Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */\n", year) print }'
* Update year in copyright headers.Andre Noll2015-01-12
| | | | | | | | | | | | | | | | Done with files=$(git grep -l 'Copyright (C) [0-9]\{4\}\(-2014\)* Andre Noll') sed --in-place= -e 's/Copyright (C) \([0-9]\{4\}\)-2014 Andre Noll/Copyright (C) \1 Andre Noll/1' $files In previous years we ran a similar script to set the second year in the range to the current year. This is kind of silly, so let's get rid of this useless information. This commit replaces "Copyright (C) A-B" by "Copyright (C) A" in all file headers, i.e. only the first year (A) is left in. Accurate information including time stamps for each change can be obtained from the git history.
* doc: Change email address to maan@tuebingen.mpg.deAndre Noll2014-08-18
| | | | | | | | | | | | | | The mail server on systemlinux.org was down for more than a week lately, so let's use an alternative official address. This commit changes all maan@systemlinux.org addresses to maan@tuebingen.mpg.de. Most .c and .h files contain the email address in the copyright header, so they must all be patched. Three other files contain the address for a different reason: * README lists email and git, gitweb and home page URLs * configure.ac needs it for configure -h * version.c contains it for the -V option of all commands
* task_register() conversion: stdin taskAndre Noll2014-05-25
| | | | | | This renames stdin_set_defaults() to stdin_task_register() and changes the function to register the stdin task. Before this patch, the task was registered in the callers.
* Change copyright year to 2014.Andre Noll2014-02-22
| | | | | | | | | This year, we're really on time. The changes in this patch were created by the following silly script: files=$(git grep -l 'Copyright (C) [0-9]\{4\}\(-2013\)* Andre Noll') sed --in-place= -e 's/Copyright (C) \([0-9]\{4\}\)-2013 Andre Noll/Copyright (C) \1-2014 Andre Noll/1' $files sed --in-place= -e 's/Copyright (C) 2013 Andre Noll/Copyright (C) 2013-2014 Andre Noll/1' $files
* stdin/stdout: Restore fd flags on shutdown.Andre Noll2013-05-05
| | | | | | | | | The stdin/stdout code should restore the flags to the old value to avoid surprises, for example in shell scripts. This changes stdin.c and stdout.c to save the old value. It is restored in ->post_select when the buffer tree node is removed and no more I/O takes place.
* Change copyright year to 2013.Andre Noll2013-03-25
| | | | Better late than never.
* Change year in copyright message to 2012.Andre Noll2012-01-07
|
* stdin.h: Add missing doxygen comment for stdin_task->btrp.Andre Noll2011-03-18
|
* Replace 2010 in copyright message by 2011.Andre Noll2011-01-17
|
* Change year in COPYRIGHT to 2010.Andre Noll2010-04-05
| | | | Hey, this is earlier than last year :)
* stdin/stdout cleanup.Andre Noll2010-01-15
| | | | | para_client was the last user of the non-btr code in stdin.[ch] and stdout.[ch]. Remove this unused code and update the documentation.
* stdin: Use buffer pools.Andre Noll2010-01-10
| | | | | | This introduces a memory leak to be fixed in a subsequent patch (the buffer pool can not be freed in post_select() because there might still be references to its area).
* stdin.c: btr preparations.Andre Noll2009-12-29
|
* Change year of copyright from 2008 to 2009.Andre Noll2009-01-10
|
* stdin: Abort if the consumer terminates.Andre Noll2008-10-13
| | | | | | | The bug in the wav filter which was fixed in the previous patch could cause para_filter to hang because the stdin task would not care whether the filter task has terminated. Fix it by introducing an output_error pointer.
* Simplify the scheduling code.Andre Noll2008-03-30
| | | | | | | | | | | | | | | | | | | | | | - Get rid of sched->select_ret. Tasks shouldn't care about the return value of the select call. - Kill task->private_data. Use container_of() instead. - Remove task->event_handler. It is never necessary and only makes the code more convoluted. The scheduler unregisters tasks as soon as either the pre_select or the post_select functions return an error. - Rename task->ret to task->error and get rid of a couple of error fields in other structs that usually only contained a copy of the task's error value. This conversion likely introduces many bugs that have to be shaken out in subsequent patches. Hopefully it will result in less error-prone code in the long run.
* Change year in Copyright comment from 2007 to 2008.Andre Noll2008-01-08
|
* Replace eof by error in receivers/filters/writers.Andre Noll2007-12-15
| | | | | | | | | | This way it's possible to tell at a later time why the receiver/filter/writer terminated. This allows to increase the delay for reconnecting in case the receiver failed to connect to para_server: Let the receivers set the error value to -E_RECV_EOF in case a normal end of file event occurred and check this value when calculating the restart barrier.
* stdin.h, stdout.h: Trivial documentation cleanup.Andre Noll2007-09-23
|
* stdin.[ch]: Make two functions static.Andre Noll2007-09-23
|
* replace standard GPL header by a one-line pointer to COPYINGAndre Noll2007-06-28
|
* doxify missing bitsAndre2006-06-13
| | | | This makes the documentation complete again.
* complete documentation of stdin.* and stdout.*Andre2006-06-13
|
* doxify stdin.hAndre2006-06-13
|
* convert para_filter to the new schedulerAndre2006-05-25
| | | | This was again straight forward.
* Make the wng->eof a pointer.Andre2006-05-23
| | | | | | | The receiver/stdin_reader already have a corresponding field. This patch also fixes a bug in the alsa_writer which was introduced by the previous patch. This bug caused a playback delay of one second.
* first version of the universal paraslash schedulerAndre2006-05-23