From 69aff9a20479a97fa4a29b0e36ad4195785f424e Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 25 May 2016 20:28:32 +0200 Subject: updated copyright info --- src/sysexec.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/sysexec.c') diff --git a/src/sysexec.c b/src/sysexec.c index 55c9830..1e50e53 100644 --- a/src/sysexec.c +++ b/src/sysexec.c @@ -5,8 +5,8 @@ * channels from one dvb device and provides the streams via minimal http. * * - * Copyright (C) 2011 Christian Pointner - * + * Copyright (C) 2011-2016 Christian Pointner + * * This file is part of gstdvbbackend. * * gstdvbbackend is free software: you can redistribute it and/or modify @@ -53,12 +53,12 @@ char** dup_ptrptr(char* const ptrptr[]) int i; for(i = 0; i < n; ++i) { - my_ptrptr[i] = strdup(ptrptr[i]); + my_ptrptr[i] = strdup(ptrptr[i]); if(!my_ptrptr[i]) { i--; for(; i >= 0; --i) free(my_ptrptr[i]); - + free(my_ptrptr); return NULL; } @@ -77,7 +77,7 @@ void free_ptrptr(char** ptrptr) int i; for(i = 0; ptrptr[i]; ++i) free(ptrptr[i]); - + free(ptrptr); } @@ -88,7 +88,7 @@ child_t* new_child(const char* script, char* const argv[], char* const evp[]) new_child = malloc(sizeof(child_t)); if(!new_child) return NULL; - + new_child->pid_ = -1; new_child->err_fd_ = -1; new_child->script_ = strdup(script); @@ -96,15 +96,15 @@ child_t* new_child(const char* script, char* const argv[], char* const evp[]) free(new_child); return NULL; } - + new_child->argv_ = dup_ptrptr(argv); if(!new_child->argv_) { free(new_child->script_); free(new_child); return NULL; - + } - + new_child->evp_ = dup_ptrptr(evp); if(!new_child->evp_) { free_ptrptr(new_child->argv_); @@ -169,7 +169,7 @@ child_t* rh_exec(const char* script, char* const argv[], char* const evp[]) log_printf(WARNING, "can't open stderr"); } execve(child->script_, child->argv_, child->evp_); - // if execve returns, an error occurred, but logging doesn't work + // if execve returns, an error occurred, but logging doesn't work // because we closed all file descriptors, so just write errno to // pipe and call exit write(pipefd[1], (void*)(&errno), sizeof(errno)); @@ -193,7 +193,7 @@ int rh_waitpid(child_t* child, int* status_return) return 0; if(pid < 0) { log_printf(ERROR, "waitpid returned with error: %s", strerror(errno)); // TODO: thread safe strerror - return pid; + return pid; } fd_set rfds; -- cgit v1.2.3